aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-06-17 22:11:22 +0000
committerUlrich Drepper <drepper@redhat.com>2003-06-17 22:11:22 +0000
commit60d73a7ac4e0116ef2e458d705aeee14aff7aed9 (patch)
tree6a54617cdad5490be019cc1ad288f9d7e7e3091a /sysdeps/unix
parentaa3cee213a291e2fd7298579059706622dd16793 (diff)
downloadglibc-60d73a7ac4e0116ef2e458d705aeee14aff7aed9.tar
glibc-60d73a7ac4e0116ef2e458d705aeee14aff7aed9.tar.gz
glibc-60d73a7ac4e0116ef2e458d705aeee14aff7aed9.tar.bz2
glibc-60d73a7ac4e0116ef2e458d705aeee14aff7aed9.zip
Update.
* sysdeps/unix/clock_nanosleep.c (clock_nanosleep): nanosleep takes care of enabling cancellation. * sysdeps/pthread/aio_suspend.c (aio_suspend): Make aio_suspend cancelable. It's not correct to disable cancellation. Instead of a cleanup handler.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/clock_nanosleep.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/sysdeps/unix/clock_nanosleep.c b/sysdeps/unix/clock_nanosleep.c
index 34bbc2dae6..7662d1704e 100644
--- a/sysdeps/unix/clock_nanosleep.c
+++ b/sysdeps/unix/clock_nanosleep.c
@@ -94,15 +94,5 @@ clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
/* Not supported. */
return ENOTSUP;
- if (SINGLE_THREAD_P)
- return __builtin_expect (nanosleep (req, rem), 0) ? errno : 0;
-
- /* More than one thread running, enable cancellation. */
- int oldstate = LIBC_CANCEL_ASYNC ();
-
- int result = __builtin_expect (nanosleep (req, rem), 0) ? errno : 0;
-
- LIBC_CANCEL_RESET (oldstate);
-
- return result;
+ return __builtin_expect (nanosleep (req, rem), 0) ? errno : 0;
}