diff options
| author | David Xu <davidxu@FreeBSD.org> | 2003-08-16 13:02:45 +0000 |
|---|---|---|
| committer | David Xu <davidxu@FreeBSD.org> | 2003-08-16 13:02:45 +0000 |
| commit | 4e7370ed1f9b2e6226f4aaad15d80663f0849380 (patch) | |
| tree | cfc7ffedbc26d049ae6f0003408e31c0b3243463 /lib/libpthread/thread/thr_yield.c | |
| parent | 1d29b4868359c425730ab581f279edf5388c1338 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_yield.c')
| -rw-r--r-- | lib/libpthread/thread/thr_yield.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_yield.c b/lib/libpthread/thread/thr_yield.c index 5c24113c2767..1133784945a9 100644 --- a/lib/libpthread/thread/thr_yield.c +++ b/lib/libpthread/thread/thr_yield.c @@ -42,7 +42,7 @@ _sched_yield(void) { struct pthread *curthread = _get_curthread(); - if (curthread->attr.flags & PTHREAD_SCOPE_SYSTEM) + if (!_kse_isthreaded() || curthread->attr.flags & PTHREAD_SCOPE_SYSTEM) return (__sys_sched_yield()); /* Reset the accumulated time slice value for the current thread: */ @@ -60,7 +60,8 @@ _pthread_yield(void) { struct pthread *curthread = _get_curthread(); - if (curthread->attr.flags & PTHREAD_SCOPE_SYSTEM) { + if (!_kse_isthreaded() || + curthread->attr.flags & PTHREAD_SCOPE_SYSTEM) { __sys_sched_yield(); return; } |
