mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
If threaded mode is not turned on yet, direct call __sys_sched_yield.
This commit is contained in:
parent
1d29b48683
commit
4e7370ed1f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118989
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user