OSDN Git Service

syscall: Use sched_yield rather than pthread_yield.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 31 Oct 2011 22:09:21 +0000 (22:09 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 31 Oct 2011 22:09:21 +0000 (22:09 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180716 138bc75d-0d04-0410-961f-82ee72b054a4

libgo/runtime/yield.c

index 3ebc4a4..4c2204d 100644 (file)
@@ -9,7 +9,7 @@
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/time.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/time.h>
-#include <pthread.h>
+#include <sched.h>
 #include <unistd.h>
 
 #ifdef HAVE_SYS_SELECT_H
 #include <unistd.h>
 
 #ifdef HAVE_SYS_SELECT_H
@@ -38,7 +38,7 @@ runtime_procyield (uint32 cnt)
 void
 runtime_osyield (void)
 {
 void
 runtime_osyield (void)
 {
-  pthread_yield ();
+  sched_yield ();
 }
 
 /* Sleep for some number of microseconds.  */
 }
 
 /* Sleep for some number of microseconds.  */