diff options
-rw-r--r-- | lib/libthr/thread/thr_create.c | 3 | ||||
-rw-r--r-- | lib/libthr/thread/thr_kern.c | 6 | ||||
-rw-r--r-- | lib/libthr/thread/thr_private.h | 2 |
3 files changed, 3 insertions, 8 deletions
diff --git a/lib/libthr/thread/thr_create.c b/lib/libthr/thread/thr_create.c index 69150ee6f8ea..dbd01f2e460a 100644 --- a/lib/libthr/thread/thr_create.c +++ b/lib/libthr/thread/thr_create.c @@ -73,8 +73,7 @@ _pthread_create(pthread_t * __restrict thread, */ if (_thr_isthreaded() == 0) { _malloc_first_thread(); - if (_thr_setthreaded(1)) - return (EAGAIN); + _thr_setthreaded(1); } curthread = _get_curthread(); diff --git a/lib/libthr/thread/thr_kern.c b/lib/libthr/thread/thr_kern.c index 77ccc6847828..1e6338657204 100644 --- a/lib/libthr/thread/thr_kern.c +++ b/lib/libthr/thread/thr_kern.c @@ -53,14 +53,10 @@ static struct wake_addr default_wake_addr; * This is called when the first thread (other than the initial * thread) is created. */ -int +void _thr_setthreaded(int threaded) { - if (((threaded == 0) ^ (__isthreaded == 0)) == 0) - return (0); - __isthreaded = threaded; - return (0); } void diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index eac8880b5d73..08f9c5de3904 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -776,7 +776,7 @@ extern struct pthread *_single_thread __hidden; * Function prototype definitions. */ __BEGIN_DECLS -int _thr_setthreaded(int) __hidden; +void _thr_setthreaded(int) __hidden; int _mutex_cv_lock(struct pthread_mutex *, int, bool) __hidden; int _mutex_cv_unlock(struct pthread_mutex *, int *, int *) __hidden; int _mutex_cv_attach(struct pthread_mutex *, int) __hidden; |