From 3387a425e65b839b68bd2973f6bc5ab22315cc5d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 25 Jun 1998 19:36:00 +0000 Subject: Finish user stack support. Change locking code to be safe in situations with different priorities. 1998-06-25 19:27 Ulrich Drepper * attr.c: Finish user stack support. Change locking code to be safe in situations with different priorities. * cancel.c: Likewise. * condvar.c: Likewise. * internals.h: Likewise. * join.c: Likewise. * manager.c: Likewise. * mutex.c: Likewise. * pthread.c: Likewise. * ptlongjmp.c: Likewise. * queue.h: Likewise. * rwlock.c: Likewise. * semaphore.c: Likewise. * semaphore.h: Likewise. * signals.c: Likewise. * spinlock.c: Likewise. * spinlock.h: Likewise. Patches by Xavier leroy. 1998-06-25 Ulrich Drepper * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and [sg]et_stackaddr prototypes always available. * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR. --- linuxthreads/cancel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'linuxthreads/cancel.c') diff --git a/linuxthreads/cancel.c b/linuxthreads/cancel.c index a6a0eca..cd2bbac 100644 --- a/linuxthreads/cancel.c +++ b/linuxthreads/cancel.c @@ -53,14 +53,14 @@ int pthread_cancel(pthread_t thread) pthread_handle handle = thread_handle(thread); int pid; - acquire(&handle->h_spinlock); + __pthread_lock(&handle->h_lock); if (invalid_handle(handle, thread)) { - release(&handle->h_spinlock); + __pthread_unlock(&handle->h_lock); return ESRCH; } handle->h_descr->p_canceled = 1; pid = handle->h_descr->p_pid; - release(&handle->h_spinlock); + __pthread_unlock(&handle->h_lock); kill(pid, PTHREAD_SIG_CANCEL); return 0; } -- cgit v1.1