GIT.Harvie.CZ
/
mirrors
/
Programs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8df6da8
)
Predavani pointeru se signalem
author
Tomas Mudrunka
<tomas@mudrunka.cz>
Wed, 30 Jun 2021 13:15:26 +0000
(15:15 +0200)
committer
Tomas Mudrunka
<tomas@mudrunka.cz>
Wed, 30 Jun 2021 13:15:26 +0000
(15:15 +0200)
c/pthread_extra/pthread_pause.c
patch
|
blob
|
blame
|
history
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
- 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;
}
This page took
0.15679 seconds
and
4
git commands to generate.