diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 2003-04-28 23:56:12 +0000 |
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 2003-04-28 23:56:12 +0000 |
| commit | 55613576f5c40d62fecb4ab76f012917fc399c3e (patch) | |
| tree | 90f4ce3660289c401aab5d0a2c4f105e5aa3e877 /lib/libpthread/thread/thr_yield.c | |
| parent | 6a9ccd81fefc8a10772034a7e4955fccdacc347f (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_yield.c')
| -rw-r--r-- | lib/libpthread/thread/thr_yield.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_yield.c b/lib/libpthread/thread/thr_yield.c index acaa3c505856..dfe72781215e 100644 --- a/lib/libpthread/thread/thr_yield.c +++ b/lib/libpthread/thread/thr_yield.c @@ -46,8 +46,9 @@ _sched_yield(void) curthread->slice_usec = -1; /* Schedule the next thread: */ + THR_LOCK_SWITCH(curthread); _thr_sched_switch(curthread); - + THR_UNLOCK_SWITCH(curthread); /* Always return no error. */ return(0); } @@ -62,5 +63,7 @@ _pthread_yield(void) curthread->slice_usec = -1; /* Schedule the next thread: */ + THR_LOCK_SWITCH(curthread); _thr_sched_switch(curthread); + THR_UNLOCK_SWITCH(curthread); } |
