diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-05-03 09:23:17 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-05-03 09:23:44 +0200 |
commit | c2fd60a5861efef48252f5cc7efc70e1d8a0da9a (patch) | |
tree | 73039b111fb8f291dfcd4cc91b9f037f82ceda93 /sysdeps/nptl/pthread.h | |
parent | 0505ae4e3b6d18b7ed1ec4c9b2d7e890acadec93 (diff) | |
download | glibc-c2fd60a5861efef48252f5cc7efc70e1d8a0da9a.zip glibc-c2fd60a5861efef48252f5cc7efc70e1d8a0da9a.tar.gz glibc-c2fd60a5861efef48252f5cc7efc70e1d8a0da9a.tar.bz2 |
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/pthread.h')
-rw-r--r-- | sysdeps/nptl/pthread.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h index af0c156..22e037d 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 |