summaryrefslogtreecommitdiff
path: root/pthread/pt-yield.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@schwinge.name>2011-09-07 18:40:56 +0200
committerThomas Schwinge <thomas@schwinge.name>2011-09-07 18:40:56 +0200
commitb9d918c0f28908c7012c9d4f65f1cf2bc103fc4b (patch)
treeaa3ad24977c9dcbe1aed672431d47f035cad85ae /pthread/pt-yield.c
parent0d733170f4056ffef9ae7e3c1f0e627b47433a97 (diff)
parentc2a1b325b7b2ce0d3d16bd1e9430e1d7eddce71e (diff)
Merge commit 'refs/top-bases/t/fix_have_kernel_resources' into t/fix_have_kernel_resources
Diffstat (limited to 'pthread/pt-yield.c')
-rw-r--r--pthread/pt-yield.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/pthread/pt-yield.c b/pthread/pt-yield.c
new file mode 100644
index 0000000..27848bb
--- /dev/null
+++ b/pthread/pt-yield.c
@@ -0,0 +1,26 @@
+/* Yield the processor to another thread or process.
+ Copyright (C) 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <pthread.h>
+#include <sched.h>
+
+int pthread_yield(void)
+{
+ return sched_yield ();
+}