diff options
author | Eric van Gyzen <vangyzen@FreeBSD.org> | 2018-11-30 03:01:32 +0000 |
---|---|---|
committer | Eric van Gyzen <vangyzen@FreeBSD.org> | 2018-11-30 03:01:32 +0000 |
commit | ad8c236b28bc5cb6efac2321c439ab761e46b899 (patch) | |
tree | 69770ec66852f4dc1e9bbd120b75fcf15fb3953d | |
parent | d92fb784585203af3734329705af17c3448925dd (diff) |
Notes
-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; |