about summary refs log tree commit diff
path: root/linuxthreads/join.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-24 05:33:59 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-24 05:33:59 +0000
commit9682a871893ca51c048ef88d95e4bd114af5c59c (patch)
treebeac732644f8e8251afa5dd5f79497926f912011 /linuxthreads/join.c
parentd52b6462c98a2287666c700060c1fea27d2a2905 (diff)
downloadglibc-9682a871893ca51c048ef88d95e4bd114af5c59c.tar.gz
glibc-9682a871893ca51c048ef88d95e4bd114af5c59c.tar.xz
glibc-9682a871893ca51c048ef88d95e4bd114af5c59c.zip
Update.
2000-04-24  Mark Kettenis  <kettenis@gnu.org>

	* join.c (pthread_exit): Set p_terminated after reporting the
	termination event instead of before.
Diffstat (limited to 'linuxthreads/join.c')
-rw-r--r--linuxthreads/join.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linuxthreads/join.c b/linuxthreads/join.c
index b703c0d34c..5a97b17f97 100644
--- a/linuxthreads/join.c
+++ b/linuxthreads/join.c
@@ -37,8 +37,6 @@ void pthread_exit(void * retval)
   /* Store return value */
   __pthread_lock(THREAD_GETMEM(self, p_lock), self);
   THREAD_SETMEM(self, p_retval, retval);
-  /* Say that we've terminated */
-  THREAD_SETMEM(self, p_terminated, 1);
   /* See whether we have to signal the death.  */
   if (THREAD_GETMEM(self, p_report_events))
     {
@@ -60,6 +58,8 @@ void pthread_exit(void * retval)
 	  __linuxthreads_death_event();
 	}
     }
+  /* Say that we've terminated */
+  THREAD_SETMEM(self, p_terminated, 1);
   /* See if someone is joining on us */
   joining = THREAD_GETMEM(self, p_joining);
   __pthread_spin_unlock(THREAD_GETMEM(self, p_lock));