From cbcdd59f788cb371aaa655f6a52899223d0b6faf Mon Sep 17 00:00:00 2001 From: Adam Fedor Date: Wed, 12 Sep 2001 22:34:44 +0000 Subject: [PATCH] Reaplce pthrea_yield with sched_yield git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10887 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Headers/gnustep/base/objc-gnu2next.h | 2 ++ Source/thr-pthread.m | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 62789d765..608c75fc5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-09-12 Adam Fedor + + * Source/thr-pthread.m (objc_yield): Replace pthread_yield with + sched_yield. + 2001-09-11 Adam Fedor * configure.in: Make sure to subst HAVE_PTHREAD_H into config.mak diff --git a/Headers/gnustep/base/objc-gnu2next.h b/Headers/gnustep/base/objc-gnu2next.h index 0adda6c44..015650dff 100644 --- a/Headers/gnustep/base/objc-gnu2next.h +++ b/Headers/gnustep/base/objc-gnu2next.h @@ -30,6 +30,8 @@ #include #include +#include +#include typedef union { char *arg_ptr; diff --git a/Source/thr-pthread.m b/Source/thr-pthread.m index 7f00e8577..731ed6e4b 100644 --- a/Source/thr-pthread.m +++ b/Source/thr-pthread.m @@ -238,7 +238,12 @@ objc_thread_get_priority(void) void objc_thread_yield(void) { +#if 0 + /* Not defined in darwin? */ pthread_yield(NULL); +#else + sched_yield(); +#endif } /* Terminate the current thread. */