aboutsummaryrefslogtreecommitdiff
path: root/lib/libthr/thread/thr_exit.c
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2005-04-12 03:00:28 +0000
committerDavid Xu <davidxu@FreeBSD.org>2005-04-12 03:00:28 +0000
commitd245d9e13fa39cab381193a24af50f540bb37e9f (patch)
treeb5ca39973148c65442650488e554719cd7db2deb /lib/libthr/thread/thr_exit.c
parenta568c78877d634ad44dd95f9a76086f032c5c0f2 (diff)
Add debugger event reporting support, current only TD_CREATE and TD_DEATH
events are reported.
Notes
Notes: svn path=/head/; revision=144921
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 554646b7de81..4f4eff6c5158 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! */
}