Fix 5771/library: in pthread_exit(), delay the call to _sem_post() that
authorguenther <guenther@openbsd.org>
Thu, 14 Aug 2008 05:20:44 +0000 (05:20 +0000)
committerguenther <guenther@openbsd.org>
Thu, 14 Aug 2008 05:20:44 +0000 (05:20 +0000)
commit2615af8ec49f7562b6f088728b6204c14e81891e
treee8361715bb52443256d74e66d50a3daa1f1da018
parent9f2c70f0732a3a963c9ef89a14a3a448e88ea700
Fix 5771/library: in pthread_exit(), delay the call to _sem_post() that
unblocks the pthread_join() for this thread until the exiting thread is
completely done with its thread structure, as the joining thread will
free it once unblocked.  Also, don't bother to call _sem_post() if the
thread is detached.

ok kurt@
lib/librthread/rthread.c