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

supposed to.
oldstable
Jeremy White 2004-10-09 02:26:29 +00:00 committed by Alexandre Julliard
parent 2aa8e871d4
commit 08c0f691ce
4 changed files with 12 additions and 0 deletions

2
configure vendored
View File

@ -16144,6 +16144,7 @@ fi
for ac_func in \
@ -16188,6 +16189,7 @@ for ac_func in \
pwrite \
readlink \
rfork \
sched_yield \
select \
sendmsg \
settimeofday \

View File

@ -1099,6 +1099,7 @@ AC_CHECK_FUNCS(\
pwrite \
readlink \
rfork \
sched_yield \
select \
sendmsg \
settimeofday \

View File

@ -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;

View File

@ -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