diff options
Diffstat (limited to 'lib/libpthread/thread/thr_single_np.c')
-rw-r--r-- | lib/libpthread/thread/thr_single_np.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/libpthread/thread/thr_single_np.c b/lib/libpthread/thread/thr_single_np.c index d6ecb48..52cd6ed 100644 --- a/lib/libpthread/thread/thr_single_np.c +++ b/lib/libpthread/thread/thr_single_np.c @@ -32,14 +32,16 @@ * $FreeBSD$ */ #include <string.h> -#ifdef _THREAD_SAFE #include <pthread.h> #include "pthread_private.h" -int pthread_single_np() +#pragma weak pthread_single_np=_pthread_single_np + +int _pthread_single_np() { + struct pthread *curthread = _get_curthread(); + /* Enter single-threaded (non-POSIX) scheduling mode: */ - _thread_single = _thread_run; + _thread_single = curthread; return(0); } -#endif |