summaryrefslogtreecommitdiff
path: root/include/pthread/pthread.h
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2010-05-19 08:32:16 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2010-05-19 08:32:16 +0200
commitd4d74c5f56d312885acf59ce0981994eef8e3dba (patch)
treeb9ad80ef6233dc8f5b4a8f19c3fd47cf819ab980 /include/pthread/pthread.h
parentfb30b6bbf28d91667dcb9691dfeefffac4f99b82 (diff)
Add pthread_yield function
* pthread/pt-yield.c: New file. * Makefile (SRCS): Add pt-yield.c * Makefile.am (libpthread_a_SOURCES): Add pt-yield.c
Diffstat (limited to 'include/pthread/pthread.h')
-rw-r--r--include/pthread/pthread.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/pthread/pthread.h b/include/pthread/pthread.h
index fbe3294..e6b9249 100644
--- a/include/pthread/pthread.h
+++ b/include/pthread/pthread.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002, 2005, 2006, 2007, 2008, 2009
+/* Copyright (C) 2000, 2002, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -734,6 +734,14 @@ extern int pthread_setschedparam (pthread_t thread, int policy,
/* Set thread THREAD's scheduling priority. */
extern int pthread_setschedprio (pthread_t thread, int prio);
+
+#ifdef __USE_GNU
+/* Yield the processor to another thread or process.
+ This function is similar to the POSIX `sched_yield' function but
+ might be differently implemented in the case of a m-on-n thread
+ implementation. */
+extern int pthread_yield (void);
+#endif
/* Kernel-specific interfaces. */