GIT.Harvie.CZ
/
mirrors
/
Programs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Predavani pointeru se signalem
[mirrors/Programs.git]
/
c
/
pthread_extra
/
pthread_pause.c
diff --git
a/c/pthread_extra/pthread_pause.c
b/c/pthread_extra/pthread_pause.c
index d168121f20e6fb986440380865beb5bbe2cb2867..e11a0531e3d645496da4822a9a828c8a046f096f 100644
(file)
--- a/
c/pthread_extra/pthread_pause.c
+++ b/
c/pthread_extra/pthread_pause.c
@@
-59,7
+59,8
@@
void pthread_pause_disable() {
int pthread_pause_reschedule(pthread_t thread) {
//Send signal to initiate pause handler
int pthread_pause_reschedule(pthread_t thread) {
//Send signal to initiate pause handler
- while(pthread_kill(thread, PTHREAD_XSIG_STOP) == EAGAIN) usleep(1000);
+ //while(pthread_kill(thread, PTHREAD_XSIG_STOP) == EAGAIN) usleep(1000);
+ while(pthread_sigqueue(thread, PTHREAD_XSIG_STOP, (const union sigval){.sival_ptr=NULL}) == EAGAIN) usleep(1000);
return 0;
}
return 0;
}
This page took
0.155719 seconds
and
4
git commands to generate.