diff options
-rw-r--r-- | libc/unistd/sleep.c | 1 | ||||
-rw-r--r-- | libpthread/nptl/pthreadP.h | 2 | ||||
-rw-r--r-- | libpthread/nptl/pthread_testcancel.c | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/libc/unistd/sleep.c b/libc/unistd/sleep.c index 9db115a29..64753a873 100644 --- a/libc/unistd/sleep.c +++ b/libc/unistd/sleep.c @@ -99,6 +99,7 @@ unsigned int sleep (unsigned int seconds) /* This is not necessary but some buggy programs depend on this. */ if (seconds == 0) { # ifdef CANCELLATION_P + int cancelhandling; CANCELLATION_P (THREAD_SELF); # endif return 0; diff --git a/libpthread/nptl/pthreadP.h b/libpthread/nptl/pthreadP.h index 850562b1f..ae24afd0c 100644 --- a/libpthread/nptl/pthreadP.h +++ b/libpthread/nptl/pthreadP.h @@ -221,7 +221,7 @@ extern int __pthread_debug attribute_hidden; /* Cancellation test. */ #define CANCELLATION_P(self) \ do { \ - int cancelhandling = THREAD_GETMEM (self, cancelhandling); \ + cancelhandling = THREAD_GETMEM (self, cancelhandling); \ if (CANCEL_ENABLED_AND_CANCELED (cancelhandling)) \ { \ THREAD_SETMEM (self, result, PTHREAD_CANCELED); \ diff --git a/libpthread/nptl/pthread_testcancel.c b/libpthread/nptl/pthread_testcancel.c index e9b17b493..fbd597a77 100644 --- a/libpthread/nptl/pthread_testcancel.c +++ b/libpthread/nptl/pthread_testcancel.c @@ -24,5 +24,6 @@ void pthread_testcancel (void) { + int cancelhandling; CANCELLATION_P (THREAD_SELF); } |