about summary refs log tree commit diff
path: root/sysdeps/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-03 09:23:17 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-03 09:23:44 +0200
commitc2fd60a5861efef48252f5cc7efc70e1d8a0da9a (patch)
tree73039b111fb8f291dfcd4cc91b9f037f82ceda93 /sysdeps/nptl
parent0505ae4e3b6d18b7ed1ec4c9b2d7e890acadec93 (diff)
downloadglibc-c2fd60a5861efef48252f5cc7efc70e1d8a0da9a.tar.gz
glibc-c2fd60a5861efef48252f5cc7efc70e1d8a0da9a.tar.xz
glibc-c2fd60a5861efef48252f5cc7efc70e1d8a0da9a.zip
nptl: Move pthread_yield into libc, as a compatibility symbol
And deprecate it in <pthread.h>, redirecting it to sched_yield
for the time being.

The symbol was moved using scripts/move-symbol-to-libc.py.

No GLIBC_2.34 symbol version is added because of the compatibility
symbol status.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/nptl')
-rw-r--r--sysdeps/nptl/pthread.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h
index af0c156c89..22e037dcb4 100644
--- a/sysdeps/nptl/pthread.h
+++ b/sysdeps/nptl/pthread.h
@@ -454,11 +454,14 @@ 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;
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (pthread_yield, (void), sched_yield)
+  __attribute_deprecated_msg__ ("\
+pthread_yield is deprecated, use sched_yield instead");
+# else
+#  define pthread_yield sched_yield
+# endif
 
 
 /* Limit specified thread TH to run only on the processors represented