diff options
Diffstat (limited to 'lib/libthr/thread/thr_exit.c')
-rw-r--r-- | lib/libthr/thread/thr_exit.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libthr/thread/thr_exit.c b/lib/libthr/thread/thr_exit.c index f71c59a..3ee5fa5 100644 --- a/lib/libthr/thread/thr_exit.c +++ b/lib/libthr/thread/thr_exit.c @@ -43,7 +43,7 @@ __weak_reference(_pthread_exit, pthread_exit); /* thr_exit() */ -extern int _thr_exit(void); +extern int _thr_exit(long *state); static void deadlist_free_threads(); @@ -164,7 +164,6 @@ _pthread_exit(void *status) deadlist_free_threads(); TAILQ_INSERT_HEAD(&_dead_list, curthread, dle); TAILQ_REMOVE(&_thread_list, curthread, tle); - curthread->isdead = 1; /* If we're the last thread, call it quits */ if (TAILQ_EMPTY(&_thread_list)) @@ -181,7 +180,7 @@ _pthread_exit(void *status) * thread, which we can't be because we've already checked * for that. */ - _thr_exit(); + _thr_exit((long *)&curthread->isdead); /* This point should not be reached. */ PANIC("Dead thread has resumed"); |