Commit 2a354d6d authored by Andreas Mohr's avatar Andreas Mohr Committed by Alexandre Julliard

Call Sleep for int 0x2f function 0x1680 (IDLE CALL).

parent 01c1466c
...@@ -319,6 +319,18 @@ static void do_int2f_16( CONTEXT86 *context ) ...@@ -319,6 +319,18 @@ static void do_int2f_16( CONTEXT86 *context )
break; break;
case 0x80: /* Release time-slice */ case 0x80: /* Release time-slice */
/* Linux sched_yield() still keeps burning CPU cycles
* if the current process is the only one in highest priority list
* (as Linux will immediately return to this process to waste
* more CPU cycles), so sched_yield() is essentially useless for us
* (poor API, if you ask me: its return code should indicate
* whether other processes did run in between, in order for us
* to be able to decide whether to do an additional Sleep() or not...)
* Thus we better unconditionally use a well-balanced Sleep()
* instead to really make sure the process calling int 0x2f/0x1680
* *doesn't* use 100% CPU...
*/
Sleep(55); /* just wait 55ms (one "timer tick") for now. */
AL_reg(context) = 0; AL_reg(context) = 0;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment