about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/pthread_join_common.c9
-rw-r--r--nptl/sem_wait.c8
2 files changed, 2 insertions, 15 deletions
diff --git a/nptl/pthread_join_common.c b/nptl/pthread_join_common.c
index 260fed4cfb..ecb78ffba5 100644
--- a/nptl/pthread_join_common.c
+++ b/nptl/pthread_join_common.c
@@ -81,14 +81,7 @@ __pthread_timedjoin_ex (pthread_t threadid, void **thread_return,
 	 un-wait-ed for again.  */
       pthread_cleanup_push (cleanup, &pd->joinid);
 
-      int oldtype = CANCEL_ASYNC ();
-
-      if (abstime != NULL)
-	result = lll_timedwait_tid (pd->tid, abstime);
-      else
-	lll_wait_tid (pd->tid);
-
-      CANCEL_RESET (oldtype);
+      result = lll_wait_tid (pd->tid, abstime);
 
       pthread_cleanup_pop (0);
     }
diff --git a/nptl/sem_wait.c b/nptl/sem_wait.c
index 61bdd9bf4f..6a2d26bd1a 100644
--- a/nptl/sem_wait.c
+++ b/nptl/sem_wait.c
@@ -56,14 +56,8 @@ __old_sem_wait (sem_t *sem)
       if (atomic_decrement_if_positive (futex) > 0)
 	return 0;
 
-      /* Enable asynchronous cancellation.  Required by the standard.  */
-      int oldtype = __pthread_enable_asynccancel ();
-
       /* Always assume the semaphore is shared.  */
-      err = lll_futex_wait (futex, 0, LLL_SHARED);
-
-      /* Disable asynchronous cancellation.  */
-      __pthread_disable_asynccancel (oldtype);
+      err = lll_futex_wait_cancel (futex, 0, LLL_SHARED);
     }
   while (err == 0 || err == -EWOULDBLOCK);