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. */