Commit 08c0f691 authored by Jeremy White's avatar Jeremy White Committed by Alexandre Julliard

Made NtDelayExecution with a 0 timeout yield the CPU, as it is

supposed to.
parent 2aa8e871
......@@ -16146,6 +16146,7 @@ fi
for ac_func in \
_lwp_create \
_lwp_self \
......@@ -16188,6 +16189,7 @@ for ac_func in \
pwrite \
readlink \
rfork \
sched_yield \
select \
sendmsg \
settimeofday \
......
......@@ -1099,6 +1099,7 @@ AC_CHECK_FUNCS(\
pwrite \
readlink \
rfork \
sched_yield \
select \
sendmsg \
settimeofday \
......
......@@ -35,6 +35,9 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_SCHED_H
# include <sched.h>
#endif
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
......@@ -632,6 +635,9 @@ NTSTATUS WINAPI NtDelayExecution( BOOLEAN alertable, const LARGE_INTEGER *timeou
{
for (;;) select( 0, NULL, NULL, NULL, NULL );
}
#ifdef HAVE_SCHED_YIELD
else if (!timeout->QuadPart) sched_yield();
#endif
else
{
abs_time_t when;
......
......@@ -500,6 +500,9 @@
/* Define to 1 if you have the <sched.h> header file. */
#undef HAVE_SCHED_H
/* Define to 1 if you have the `sched_yield' function. */
#undef HAVE_SCHED_YIELD
/* Define to 1 if you have the <scsi/scsi.h> header file. */
#undef HAVE_SCSI_SCSI_H
......
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