cb0152f
--- cl-original/kernel/thread.h	2021-06-24 14:55:26.169597780 +0200
cb0152f
+++ cl-patched/kernel/thread.h	2021-06-24 14:58:02.485568178 +0200
cb0152f
@@ -2979,6 +2979,8 @@
cb0152f
    "Posix is portable in the sense that you can use a forklift to move the
cb0152f
     printed volumes around" */
cb0152f
 
cb0152f
+#include <sched.h>
cb0152f
+
cb0152f
 #define THREADFUNC_DEFINE( name, arg )	void *name( void *arg )
cb0152f
 #define THREAD_CREATE( function, arg, threadHandle, syncHandle, status ) \
cb0152f
 			{ \
cb0152f
@@ -3016,7 +3018,11 @@
cb0152f
   #if defined( __linux__ ) && !defined( __USE_GNU )
cb0152f
 	void pthread_yield( void );
cb0152f
   #endif /* Present but not prototyped unless GNU extensions are enabled */
cb0152f
-  #define  THREAD_YIELD()		pthread_yield()
cb0152f
+  
cb0152f
+  #if defined( __linux__ ) && ( OSVERSION > 3 )
cb0152f
+       #define  THREAD_YIELD()		sched_yield()
cb0152f
+  #endif
cb0152f
+
cb0152f
 #endif /* Not-very-portable Posix portability */
cb0152f
 #define THREAD_SLEEP( ms )		{ \
cb0152f
 								struct timeval tv = { 0 }; \