--- src/lib/libthread_xu/thread/thr_exit.c 2005/02/01 12:38:27 1.1 +++ src/lib/libthread_xu/thread/thr_exit.c 2005/03/29 19:26:20 1.2 @@ -32,6 +32,9 @@ * $FreeBSD: src/lib/libpthread/thread/thr_exit.c,v 1.39 2004/10/23 23:37:54 davidxu Exp $ * $DragonFly$ */ + +#include + #include #include #include @@ -65,7 +68,7 @@ _thread_exit(char *fname, int lineno, ch void _thr_exit_cleanup(void) { - struct pthread *curthread = _get_curthread(); + struct pthread *curthread = tls_get_curthread(); /* * POSIX states that cancellation/termination of a thread should @@ -86,7 +89,7 @@ _thr_exit_cleanup(void) void _pthread_exit(void *status) { - struct pthread *curthread = _get_curthread(); + struct pthread *curthread = tls_get_curthread(); /* Check if this thread is already in the process of exiting: */ if ((curthread->cancelflags & THR_CANCEL_EXITING) != 0) {