diff options
Diffstat (limited to 'lib/libpthread/thread/thr_cond.c')
-rw-r--r-- | lib/libpthread/thread/thr_cond.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_cond.c b/lib/libpthread/thread/thr_cond.c index 15b95f7..c71a1ea 100644 --- a/lib/libpthread/thread/thr_cond.c +++ b/lib/libpthread/thread/thr_cond.c @@ -184,6 +184,9 @@ _pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) (rval = pthread_cond_init(cond, NULL)) != 0) return (rval); + if (!_kse_isthreaded()) + _kse_setthreaded(1); + /* * Enter a loop waiting for a condition signal or broadcast * to wake up this thread. A loop is needed in case the waiting @@ -388,6 +391,9 @@ _pthread_cond_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex, if (*cond == NULL && (rval = pthread_cond_init(cond, NULL)) != 0) return (rval); + if (!_kse_isthreaded()) + _kse_setthreaded(1); + /* * Enter a loop waiting for a condition signal or broadcast * to wake up this thread. A loop is needed in case the waiting |