Commit 3203f056 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

Revert "ntdll: Implement NtYieldExecution() as usleep().".

Rémi found a regression caused by that patch. His analysis suggests that it's probably correct for NtYieldExecution() to map to sched_yield(). Let's revert the patch and fix the issue in a slightly different way. This reverts commit b1a79c6b. Signed-off-by: 's avatarMatteo Bruni <mbruni@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent cee2d4c4
...@@ -1512,7 +1512,6 @@ enable_msv1_0 ...@@ -1512,7 +1512,6 @@ enable_msv1_0
enable_msvcirt enable_msvcirt
enable_msvcm80 enable_msvcm80
enable_msvcm90 enable_msvcm90
enable_msvcp_win
enable_msvcp100 enable_msvcp100
enable_msvcp110 enable_msvcp110
enable_msvcp120 enable_msvcp120
...@@ -1524,6 +1523,7 @@ enable_msvcp70 ...@@ -1524,6 +1523,7 @@ enable_msvcp70
enable_msvcp71 enable_msvcp71
enable_msvcp80 enable_msvcp80
enable_msvcp90 enable_msvcp90
enable_msvcp_win
enable_msvcr100 enable_msvcr100
enable_msvcr110 enable_msvcr110
enable_msvcr120 enable_msvcr120
...@@ -19086,6 +19086,12 @@ then : ...@@ -19086,6 +19086,12 @@ then :
printf "%s\n" "#define HAVE_PROC_PIDINFO 1" >>confdefs.h printf "%s\n" "#define HAVE_PROC_PIDINFO 1" >>confdefs.h
fi fi
ac_fn_c_check_func "$LINENO" "sched_yield" "ac_cv_func_sched_yield"
if test "x$ac_cv_func_sched_yield" = xyes
then :
printf "%s\n" "#define HAVE_SCHED_YIELD 1" >>confdefs.h
fi
ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle" ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
if test "x$ac_cv_func_setproctitle" = xyes if test "x$ac_cv_func_setproctitle" = xyes
then : then :
...@@ -21595,7 +21601,6 @@ wine_fn_config_makefile dlls/msvcirt enable_msvcirt ...@@ -21595,7 +21601,6 @@ wine_fn_config_makefile dlls/msvcirt enable_msvcirt
wine_fn_config_makefile dlls/msvcirt/tests enable_tests wine_fn_config_makefile dlls/msvcirt/tests enable_tests
wine_fn_config_makefile dlls/msvcm80 enable_msvcm80 wine_fn_config_makefile dlls/msvcm80 enable_msvcm80
wine_fn_config_makefile dlls/msvcm90 enable_msvcm90 wine_fn_config_makefile dlls/msvcm90 enable_msvcm90
wine_fn_config_makefile dlls/msvcp_win enable_msvcp_win
wine_fn_config_makefile dlls/msvcp100 enable_msvcp100 wine_fn_config_makefile dlls/msvcp100 enable_msvcp100
wine_fn_config_makefile dlls/msvcp100/tests enable_tests wine_fn_config_makefile dlls/msvcp100/tests enable_tests
wine_fn_config_makefile dlls/msvcp110 enable_msvcp110 wine_fn_config_makefile dlls/msvcp110 enable_msvcp110
...@@ -21614,6 +21619,7 @@ wine_fn_config_makefile dlls/msvcp71 enable_msvcp71 ...@@ -21614,6 +21619,7 @@ wine_fn_config_makefile dlls/msvcp71 enable_msvcp71
wine_fn_config_makefile dlls/msvcp80 enable_msvcp80 wine_fn_config_makefile dlls/msvcp80 enable_msvcp80
wine_fn_config_makefile dlls/msvcp90 enable_msvcp90 wine_fn_config_makefile dlls/msvcp90 enable_msvcp90
wine_fn_config_makefile dlls/msvcp90/tests enable_tests wine_fn_config_makefile dlls/msvcp90/tests enable_tests
wine_fn_config_makefile dlls/msvcp_win enable_msvcp_win
wine_fn_config_makefile dlls/msvcr100 enable_msvcr100 wine_fn_config_makefile dlls/msvcr100 enable_msvcr100
wine_fn_config_makefile dlls/msvcr100/tests enable_tests wine_fn_config_makefile dlls/msvcr100/tests enable_tests
wine_fn_config_makefile dlls/msvcr110 enable_msvcr110 wine_fn_config_makefile dlls/msvcr110 enable_msvcr110
......
...@@ -1948,6 +1948,7 @@ AC_CHECK_FUNCS(\ ...@@ -1948,6 +1948,7 @@ AC_CHECK_FUNCS(\
posix_fallocate \ posix_fallocate \
prctl \ prctl \
proc_pidinfo \ proc_pidinfo \
sched_yield \
setproctitle \ setproctitle \
setprogname \ setprogname \
sigprocmask \ sigprocmask \
...@@ -3133,7 +3134,6 @@ WINE_CONFIG_MAKEFILE(dlls/msvcirt) ...@@ -3133,7 +3134,6 @@ WINE_CONFIG_MAKEFILE(dlls/msvcirt)
WINE_CONFIG_MAKEFILE(dlls/msvcirt/tests) WINE_CONFIG_MAKEFILE(dlls/msvcirt/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcm80) WINE_CONFIG_MAKEFILE(dlls/msvcm80)
WINE_CONFIG_MAKEFILE(dlls/msvcm90) WINE_CONFIG_MAKEFILE(dlls/msvcm90)
WINE_CONFIG_MAKEFILE(dlls/msvcp_win)
WINE_CONFIG_MAKEFILE(dlls/msvcp100) WINE_CONFIG_MAKEFILE(dlls/msvcp100)
WINE_CONFIG_MAKEFILE(dlls/msvcp100/tests) WINE_CONFIG_MAKEFILE(dlls/msvcp100/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcp110) WINE_CONFIG_MAKEFILE(dlls/msvcp110)
...@@ -3152,6 +3152,7 @@ WINE_CONFIG_MAKEFILE(dlls/msvcp71) ...@@ -3152,6 +3152,7 @@ WINE_CONFIG_MAKEFILE(dlls/msvcp71)
WINE_CONFIG_MAKEFILE(dlls/msvcp80) WINE_CONFIG_MAKEFILE(dlls/msvcp80)
WINE_CONFIG_MAKEFILE(dlls/msvcp90) WINE_CONFIG_MAKEFILE(dlls/msvcp90)
WINE_CONFIG_MAKEFILE(dlls/msvcp90/tests) WINE_CONFIG_MAKEFILE(dlls/msvcp90/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcp_win)
WINE_CONFIG_MAKEFILE(dlls/msvcr100) WINE_CONFIG_MAKEFILE(dlls/msvcr100)
WINE_CONFIG_MAKEFILE(dlls/msvcr100/tests) WINE_CONFIG_MAKEFILE(dlls/msvcr100/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcr110) WINE_CONFIG_MAKEFILE(dlls/msvcr110)
......
...@@ -1447,8 +1447,12 @@ NTSTATUS WINAPI NtSignalAndWaitForSingleObject( HANDLE signal, HANDLE wait, ...@@ -1447,8 +1447,12 @@ NTSTATUS WINAPI NtSignalAndWaitForSingleObject( HANDLE signal, HANDLE wait,
*/ */
NTSTATUS WINAPI NtYieldExecution(void) NTSTATUS WINAPI NtYieldExecution(void)
{ {
usleep(0); #ifdef HAVE_SCHED_YIELD
sched_yield();
return STATUS_SUCCESS; return STATUS_SUCCESS;
#else
return STATUS_NO_YIELD_PERFORMED;
#endif
} }
......
...@@ -443,6 +443,9 @@ ...@@ -443,6 +443,9 @@
/* Define to 1 if you have the `sched_setaffinity' function. */ /* Define to 1 if you have the `sched_setaffinity' function. */
#undef HAVE_SCHED_SETAFFINITY #undef HAVE_SCHED_SETAFFINITY
/* Define to 1 if you have the `sched_yield' function. */
#undef HAVE_SCHED_YIELD
/* Define to 1 if `cmd' is a member of `scsireq_t'. */ /* Define to 1 if `cmd' is a member of `scsireq_t'. */
#undef HAVE_SCSIREQ_T_CMD #undef HAVE_SCSIREQ_T_CMD
......
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