Date: Sat, 20 Nov 2004 04:44:08 GMT From: David Xu <davidxu@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 65515 for review Message-ID: <200411200444.iAK4i8Ab006466@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=65515 Change 65515 by davidxu@davidxu_alona on 2004/11/20 04:44:01 call __sys_sched_yield. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_yield.c#2 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_yield.c#2 (text+ko) ==== @@ -40,34 +40,12 @@ int _sched_yield(void) { - struct pthread *curthread = _get_curthread(); - - if (curthread->attr.flags & PTHREAD_SCOPE_SYSTEM) - return (__sys_sched_yield()); - - /* Reset the accumulated time slice value for the current thread: */ - curthread->slice_usec = -1; - - /* Schedule the next thread: */ - _thr_sched_switch(curthread); - /* Always return no error. */ - return(0); + return (__sys_sched_yield()); } /* Draft 4 yield */ void _pthread_yield(void) { - struct pthread *curthread = _get_curthread(); - - if (curthread->attr.flags & PTHREAD_SCOPE_SYSTEM) { - __sys_sched_yield(); - return; - } - - /* Reset the accumulated time slice value for the current thread: */ - curthread->slice_usec = -1; - - /* Schedule the next thread: */ - _thr_sched_switch(curthread); + __sys_sched_yield(); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411200444.iAK4i8Ab006466>