summaryrefslogtreecommitdiff
path: root/linuxthreads/join.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-11-02 23:44:42 +0000
committerUlrich Drepper <drepper@redhat.com>1999-11-02 23:44:42 +0000
commita9cb398f7b2a6a8549ec33cdcc99f510566d3819 (patch)
tree03683c10060e9a77ed564004e04fa4e8c043db5d /linuxthreads/join.c
parent03fc7ab6ed4bc2f71964a3d31ad578821256b6bc (diff)
downloadglibc-a9cb398f7b2a6a8549ec33cdcc99f510566d3819.tar.gz
Update.
1999-11-02 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/i386/sys/procfs.h: Include sys/ucontext.h instead of duplicating definitions.
Diffstat (limited to 'linuxthreads/join.c')
-rw-r--r--linuxthreads/join.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/linuxthreads/join.c b/linuxthreads/join.c
index 42eb033746..a2c8b20ca2 100644
--- a/linuxthreads/join.c
+++ b/linuxthreads/join.c
@@ -39,6 +39,26 @@ void pthread_exit(void * retval)
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))
+ {
+ /* See whether TD_DEATH is in any of the mask. */
+ int idx = __td_eventword (TD_DEATH);
+ uint32_t mask = __td_eventmask (TD_DEATH);
+
+ if ((mask & (__pthread_threads_events.event_bits[idx]
+ | THREAD_GETMEM(self,
+ p_eventbuf.eventmask).event_bits[idx]))
+ != 0)
+ {
+ /* Yep, we have to signal the death. */
+ THREAD_SETMEM(self, p_eventbuf.eventnum, TD_DEATH);
+ THREAD_SETMEM(self, p_eventbuf.eventdata, self);
+
+ /* Now call the function to signal the event. */
+ __linuxthreads_death_event();
+ }
+ }
/* See if someone is joining on us */
joining = THREAD_GETMEM(self, p_joining);
__pthread_unlock(THREAD_GETMEM(self, p_lock));