diff options
| author | Mike Makonnen <mtm@FreeBSD.org> | 2003-05-21 03:29:18 +0000 |
|---|---|---|
| committer | Mike Makonnen <mtm@FreeBSD.org> | 2003-05-21 03:29:18 +0000 |
| commit | f97591bf25b5de8ddda04983931b947fe3ef1446 (patch) | |
| tree | 75f65ff133c18ec9f518558a82ace78112b35318 /lib/libthr/thread/thr_exit.c | |
| parent | 3f07b4bcbd9487f07b244731504e00e238da94d2 (diff) | |
Notes
Diffstat (limited to 'lib/libthr/thread/thr_exit.c')
| -rw-r--r-- | lib/libthr/thread/thr_exit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_exit.c b/lib/libthr/thread/thr_exit.c index f18c7c88bc2a..059af3dd3db7 100644 --- a/lib/libthr/thread/thr_exit.c +++ b/lib/libthr/thread/thr_exit.c @@ -171,6 +171,10 @@ _pthread_exit(void *status) PTHREAD_SET_STATE(curthread, PS_DEAD); GIANT_UNLOCK(curthread); + /* If we're the last thread, call it quits */ + if (TAILQ_EMPTY(&_thread_list)) + exit(curthread->ret); + /* * Retire the architecture specific id so that it can be used for * new threads. |
