From 22f14eaadfe2f54e3d94f9a549dbb55a301222e1 Mon Sep 17 00:00:00 2001 From: jasone Date: Wed, 27 Jun 2001 11:41:15 +0000 Subject: Fix a race condition in pthread_join(). All of the following must occur atomically: 1) Search _thread_list for the thread to join. 2) Search _dead_list for the thread to join. 3) Set the running thread as the joiner. While we're at it, fix a race in the case where multiple threads try to join on the same thread. POSIX says that the behavior of multiple joiners is undefined, but the fix is cheap as a result of the other fix. --- lib/libc_r/uthread/pthread_private.h | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/libc_r/uthread/pthread_private.h') diff --git a/lib/libc_r/uthread/pthread_private.h b/lib/libc_r/uthread/pthread_private.h index 3bfb7c0..6528c13 100644 --- a/lib/libc_r/uthread/pthread_private.h +++ b/lib/libc_r/uthread/pthread_private.h @@ -1207,7 +1207,6 @@ char *__ttyname_r_basic(int, char *, size_t); char *ttyname_r(int, char *, size_t); void _cond_wait_backout(pthread_t); void _fd_lock_backout(pthread_t); -int _find_dead_thread(pthread_t); int _find_thread(pthread_t); struct pthread *_get_curthread(void); void _set_curthread(struct pthread *); -- cgit v1.1