diff options
Diffstat (limited to 'lib/libthr/thread/thr_self.c')
-rw-r--r-- | lib/libthr/thread/thr_self.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_self.c b/lib/libthr/thread/thr_self.c index 0d69538..baaf44c 100644 --- a/lib/libthr/thread/thr_self.c +++ b/lib/libthr/thread/thr_self.c @@ -31,7 +31,9 @@ * * $FreeBSD$ */ + #include <pthread.h> + #include "thr_private.h" __weak_reference(_pthread_self, pthread_self); @@ -39,6 +41,8 @@ __weak_reference(_pthread_self, pthread_self); pthread_t _pthread_self(void) { + _thr_check_init(); + /* Return the running thread pointer: */ - return (curthread); + return (_get_curthread()); } |