summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_exit.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2005-04-12 03:00:28 +0000
committerdavidxu <davidxu@FreeBSD.org>2005-04-12 03:00:28 +0000
commit2cf5eeb00151f72e5aa07f0289c2889752eb07d9 (patch)
treeb5ca39973148c65442650488e554719cd7db2deb /lib/libthr/thread/thr_exit.c
parentc874648f8b61fce9d0fd977d6502638d882c2f33 (diff)
downloadFreeBSD-src-2cf5eeb00151f72e5aa07f0289c2889752eb07d9.zip
FreeBSD-src-2cf5eeb00151f72e5aa07f0289c2889752eb07d9.tar.gz
Add debugger event reporting support, current only TD_CREATE and TD_DEATH
events are reported.
Diffstat (limited to 'lib/libthr/thread/thr_exit.c')
-rw-r--r--lib/libthr/thread/thr_exit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_exit.c b/lib/libthr/thread/thr_exit.c
index 554646b..4f4eff6 100644
--- a/lib/libthr/thread/thr_exit.c
+++ b/lib/libthr/thread/thr_exit.c
@@ -130,7 +130,9 @@ _pthread_exit(void *status)
THREAD_LIST_UNLOCK(curthread);
if (curthread->joiner)
_thr_umtx_wake(&curthread->state, INT_MAX);
- thr_exit(&curthread->terminated);
+ if (SHOULD_REPORT_EVENT(curthread, TD_DEATH))
+ _thr_report_death(curthread);
+ thr_exit(&curthread->tid);
PANIC("thr_exit() returned");
/* Never reach! */
}
OpenPOWER on IntegriCloud