From 5e6a91549e926011462d669215088f445272273b Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 6 Jul 2011 18:35:44 +0000 Subject: [PATCH] * sched.c (sched_yield): Just call SwitchToThread because yield now potentially switches CPU. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/sched.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 9de00f0a7..a8131c004 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2011-07-06 Corinna Vinschen + + * sched.c (sched_yield): Just call SwitchToThread because yield now + potentially switches CPU. + 2011-07-06 Christopher Faylor * exceptions.cc (_cygtls::interrupt_now): Don't check for spinning diff --git a/winsup/cygwin/sched.cc b/winsup/cygwin/sched.cc index c82e54abb..9c8aa0467 100644 --- a/winsup/cygwin/sched.cc +++ b/winsup/cygwin/sched.cc @@ -483,7 +483,7 @@ sched_setscheduler (pid_t pid, int policy, int sched_yield () { - yield (); + SwitchToThread (); return 0; } }