Selaa lähdekoodia

linuxthreads.old: define pthread_yield to sched_yield

The pthread_yield() function in linuxthreads does the same thing as the
standardized sched_yield() function, so add a simple define for it to make
porting GNU apps easier.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger 15 vuotta sitten
vanhempi
commit
8f746280f5
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      libpthread/linuxthreads.old/sysdeps/pthread/pthread.h

+ 5 - 0
libpthread/linuxthreads.old/sysdeps/pthread/pthread.h

@@ -323,6 +323,11 @@ extern int pthread_getconcurrency (void) __THROW;
 extern int pthread_setconcurrency (int __level) __THROW;
 #endif
 
+#ifdef __USE_GNU
+/* Same thing, different name */
+#define pthread_yield() sched_yield()
+#endif
+
 /* Functions for mutex handling.  */
 
 /* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the