summary refs log tree commit diff
path: root/linuxthreads
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-16 01:18:43 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-16 01:18:43 +0000
commitc269fdb42faa5bfe25453b03a2d74ebb68926d99 (patch)
tree37d54f45bf275e76565baffc393f568a288d6809 /linuxthreads
parent145b84138f8b1fca851196451ab0f21a054ae754 (diff)
downloadglibc-c269fdb42faa5bfe25453b03a2d74ebb68926d99.tar.gz
glibc-c269fdb42faa5bfe25453b03a2d74ebb68926d99.tar.xz
glibc-c269fdb42faa5bfe25453b03a2d74ebb68926d99.zip
Update.
	* csu/Makefile ($(objpfx)version-info.h): Get OS name from uname and
	only fall back on using Linux.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog4
-rw-r--r--linuxthreads/Versions3
-rw-r--r--linuxthreads/pthread.c7
-rw-r--r--linuxthreads/sysdeps/pthread/pthread.h8
4 files changed, 22 insertions, 0 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index f9a3bf9240..9a1213b910 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,5 +1,9 @@
 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
 
+	* pthread.c (pthread_yield): New function.
+	* sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
+	* Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
+
 	* pthread.c (pthread_initialize): Avoid a bit more code if
 	realtime signals are known to exist.
 
diff --git a/linuxthreads/Versions b/linuxthreads/Versions
index 92ec98da5f..5579bea011 100644
--- a/linuxthreads/Versions
+++ b/linuxthreads/Versions
@@ -135,5 +135,8 @@ libpthread {
     pthread_spin_destroy; pthread_spin_init; pthread_spin_lock;
     pthread_spin_trylock; pthread_spin_unlock;
     pthread_getcpuclockid;
+
+    # Extensions.
+    pthread_yield;
   }
 }
diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c
index eca90635b0..ae747bc5ac 100644
--- a/linuxthreads/pthread.c
+++ b/linuxthreads/pthread.c
@@ -634,6 +634,13 @@ int pthread_getschedparam(pthread_t thread, int *policy,
   return 0;
 }
 
+int __pthread_yield ()
+{
+  /* For now this is equivalent with the POSIX call.  */
+  return sched_yield ();
+}
+weak_alias (__pthread_yield, pthread_yield)
+
 /* Process-wide exit() request */
 
 static void pthread_exit_process(int retcode, void *arg)
diff --git a/linuxthreads/sysdeps/pthread/pthread.h b/linuxthreads/sysdeps/pthread/pthread.h
index de00130029..e82c4deb99 100644
--- a/linuxthreads/sysdeps/pthread/pthread.h
+++ b/linuxthreads/sysdeps/pthread/pthread.h
@@ -272,6 +272,14 @@ extern int pthread_getconcurrency (void) __THROW;
 extern int pthread_setconcurrency (int __level) __THROW;
 #endif
 
+#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) __THROW;
+#endif
+
 /* Functions for mutex handling.  */
 
 /* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the