medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit becd291e7505f07a012b63bdb8a91208985ee0f5
parent 94f4142716079ac1bdcb91a2b8098610a84d59db
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun Dec 25 21:03:14 +0200

pthread_yield has no return value on OpenBSD

Diffstat:
unix_thread.h | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/unix_thread.h b/unix_thread.h @@ -53,13 +53,17 @@ inline void thread_join( Thread * thread ) { } inline void thread_yield() { -#if PLATFORM_OSX - sched_yield(); -#else +#if PLATFORM_LINUX int ok = pthread_yield(); if( ok == -1 ) { err( 1, "pthread_yield" ); } +#elif PLATFORM_OSX + sched_yield(); +#elif PLATFORM_OPENBSD + pthread_yield(); +#else +#error new platform #endif }