Add missing thread yield system call.
This change fixes a bug where the threads were not treated fairly. Before the fix, empth_yield would only yield to threads already waiting hThreadMutex mutex. It would not yield to other threads ready to run from the release of other mutexes. An example of this is that the update task did not start when force command was issued from script sequence.
This commit is contained in:
parent
e89a4b5657
commit
9a4f49f128
1 changed files with 1 additions and 0 deletions
|
@ -510,6 +510,7 @@ void
|
||||||
empth_yield(void)
|
empth_yield(void)
|
||||||
{
|
{
|
||||||
loc_BlockThisThread();
|
loc_BlockThisThread();
|
||||||
|
Sleep(0);
|
||||||
loc_RunThisThread(NULL);
|
loc_RunThisThread(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue