mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
htl: move pthread_mutexattr_setpshared, pthread_mutexattr_getpshared into libc.
Message-ID: <20241231134909.1166440-7-gfleury@disroot.org>
This commit is contained in:
parent
b386295727
commit
1e5b39a5e0
9 changed files with 41 additions and 12 deletions
|
@ -55,9 +55,7 @@ libpthread-routines := \
|
|||
pt-testcancel \
|
||||
pt-cancel \
|
||||
pt-mutexattr-getprioceiling \
|
||||
pt-mutexattr-getpshared \
|
||||
pt-mutexattr-setprioceiling \
|
||||
pt-mutexattr-setpshared \
|
||||
pt-mutexattr-getrobust \
|
||||
pt-mutexattr-setrobust \
|
||||
pt-mutex-init \
|
||||
|
@ -197,9 +195,11 @@ routines := \
|
|||
pt-mutex-checklocked \
|
||||
pt-mutexattr-destroy \
|
||||
pt-mutexattr-getprotocol \
|
||||
pt-mutexattr-getpshared \
|
||||
pt-mutexattr-gettype \
|
||||
pt-mutexattr-init \
|
||||
pt-mutexattr-setprotocol \
|
||||
pt-mutexattr-setpshared \
|
||||
pt-mutexattr-settype \
|
||||
pt-nthreads \
|
||||
pt-pthread_self \
|
||||
|
|
|
@ -40,9 +40,11 @@ libc {
|
|||
pthread_condattr_setpshared;
|
||||
pthread_mutexattr_destroy;
|
||||
pthread_mutexattr_getprotocol;
|
||||
pthread_mutexattr_getpshared;
|
||||
pthread_mutexattr_gettype;
|
||||
pthread_mutexattr_init;
|
||||
pthread_mutexattr_setprotocol;
|
||||
pthread_mutexattr_setpshared;
|
||||
pthread_mutexattr_settype;
|
||||
pthread_sigmask;
|
||||
}
|
||||
|
@ -90,8 +92,10 @@ libc {
|
|||
pthread_condattr_setclock;
|
||||
pthread_condattr_setpshared;
|
||||
pthread_mutexattr_getprotocol;
|
||||
pthread_mutexattr_getpshared;
|
||||
pthread_mutexattr_gettype;
|
||||
pthread_mutexattr_setprotocol;
|
||||
pthread_mutexattr_setpshared;
|
||||
pthread_mutexattr_settype;
|
||||
pthread_sigmask;
|
||||
}
|
||||
|
@ -188,9 +192,7 @@ libpthread {
|
|||
pthread_mutex_trylock; pthread_mutex_unlock;
|
||||
|
||||
pthread_mutexattr_getprioceiling;
|
||||
pthread_mutexattr_getpshared;
|
||||
pthread_mutexattr_setprioceiling;
|
||||
pthread_mutexattr_setpshared;
|
||||
|
||||
pthread_once;
|
||||
|
||||
|
|
|
@ -39,6 +39,12 @@ extern int __pthread_mutex_timedlock (pthread_mutex_t *__mutex,
|
|||
const struct timespec *__abstime);
|
||||
extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
|
||||
extern int __pthread_mutexattr_settype (pthread_mutexattr_t *attr, int kind);
|
||||
extern int __pthread_mutexattr_getpshared(const pthread_mutexattr_t *__restrict __attr,
|
||||
int *__restrict __pshared);
|
||||
libc_hidden_proto (__pthread_mutexattr_getpshared)
|
||||
extern int __pthread_mutexattr_setpshared(pthread_mutexattr_t *__attr,
|
||||
int __pshared);
|
||||
libc_hidden_proto (__pthread_mutexattr_setpshared)
|
||||
|
||||
extern int __pthread_mutexattr_getprotocol(const pthread_mutexattr_t *__restrict __attr,
|
||||
int *__restrict __protocol);
|
||||
|
|
|
@ -16,16 +16,23 @@
|
|||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <pthread.h>
|
||||
#include <pthreadP.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <pt-internal.h>
|
||||
#include "pt-mutex.h"
|
||||
#include <hurdlock.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
int
|
||||
pthread_mutexattr_getpshared (const pthread_mutexattr_t *attrp, int *outp)
|
||||
__pthread_mutexattr_getpshared (const pthread_mutexattr_t *attrp, int *outp)
|
||||
{
|
||||
*outp = attrp->__pshared;
|
||||
return 0;
|
||||
}
|
||||
libc_hidden_def (__pthread_mutexattr_getpshared)
|
||||
versioned_symbol (libc, __pthread_mutexattr_getpshared, pthread_mutexattr_getpshared, GLIBC_2_41);
|
||||
|
||||
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41)
|
||||
compat_symbol (libpthread, __pthread_mutexattr_getpshared,pthread_mutexattr_getpshared, GLIBC_2_12);
|
||||
#endif
|
||||
|
|
|
@ -16,15 +16,16 @@
|
|||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <pthread.h>
|
||||
#include <pthreadP.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <pt-internal.h>
|
||||
#include "pt-mutex.h"
|
||||
#include <hurdlock.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
int
|
||||
pthread_mutexattr_setpshared (pthread_mutexattr_t *attrp, int pshared)
|
||||
__pthread_mutexattr_setpshared (pthread_mutexattr_t *attrp, int pshared)
|
||||
{
|
||||
if (pshared != PTHREAD_PROCESS_PRIVATE && pshared != PTHREAD_PROCESS_SHARED)
|
||||
return EINVAL;
|
||||
|
@ -32,3 +33,10 @@ pthread_mutexattr_setpshared (pthread_mutexattr_t *attrp, int pshared)
|
|||
attrp->__pshared = pshared;
|
||||
return 0;
|
||||
}
|
||||
|
||||
libc_hidden_def (__pthread_mutexattr_setpshared)
|
||||
versioned_symbol (libc, __pthread_mutexattr_setpshared, pthread_mutexattr_setpshared, GLIBC_2_41);
|
||||
|
||||
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41)
|
||||
compat_symbol (libpthread, __pthread_mutexattr_setpshared,pthread_mutexattr_setpshared, GLIBC_2_12);
|
||||
#endif
|
||||
|
|
|
@ -65,9 +65,11 @@ GLIBC_2.12 pthread_equal F
|
|||
GLIBC_2.12 pthread_getschedparam F
|
||||
GLIBC_2.12 pthread_mutexattr_destroy F
|
||||
GLIBC_2.12 pthread_mutexattr_getprotocol F
|
||||
GLIBC_2.12 pthread_mutexattr_getpshared F
|
||||
GLIBC_2.12 pthread_mutexattr_gettype F
|
||||
GLIBC_2.12 pthread_mutexattr_init F
|
||||
GLIBC_2.12 pthread_mutexattr_setprotocol F
|
||||
GLIBC_2.12 pthread_mutexattr_setpshared F
|
||||
GLIBC_2.12 pthread_mutexattr_settype F
|
||||
GLIBC_2.12 pthread_self F
|
||||
GLIBC_2.12 pthread_setschedparam F
|
||||
|
@ -2528,8 +2530,11 @@ GLIBC_2.41 pthread_condattr_getpshared F
|
|||
GLIBC_2.41 pthread_condattr_setclock F
|
||||
GLIBC_2.41 pthread_condattr_setpshared F
|
||||
GLIBC_2.41 pthread_mutexattr_getprotocol F
|
||||
GLIBC_2.41 pthread_mutexattr_getpshared F
|
||||
GLIBC_2.41 pthread_mutexattr_gettype F
|
||||
GLIBC_2.41 pthread_mutexattr_setprotocol F
|
||||
GLIBC_2.41 pthread_mutexattr_setpshared F
|
||||
GLIBC_2.41 pthread_mutexattr_settype F
|
||||
GLIBC_2.41 pthread_sigmask F
|
||||
GLIBC_2.5 __readlinkat_chk F
|
||||
GLIBC_2.5 inet6_opt_append F
|
||||
|
|
|
@ -51,9 +51,7 @@ GLIBC_2.12 pthread_mutex_transfer_np F
|
|||
GLIBC_2.12 pthread_mutex_trylock F
|
||||
GLIBC_2.12 pthread_mutex_unlock F
|
||||
GLIBC_2.12 pthread_mutexattr_getprioceiling F
|
||||
GLIBC_2.12 pthread_mutexattr_getpshared F
|
||||
GLIBC_2.12 pthread_mutexattr_setprioceiling F
|
||||
GLIBC_2.12 pthread_mutexattr_setpshared F
|
||||
GLIBC_2.12 pthread_once F
|
||||
GLIBC_2.12 pthread_rwlock_destroy F
|
||||
GLIBC_2.12 pthread_rwlock_init F
|
||||
|
|
|
@ -1553,9 +1553,11 @@ GLIBC_2.38 pthread_mutex_lock F
|
|||
GLIBC_2.38 pthread_mutex_unlock F
|
||||
GLIBC_2.38 pthread_mutexattr_destroy F
|
||||
GLIBC_2.38 pthread_mutexattr_getprotocol F
|
||||
GLIBC_2.38 pthread_mutexattr_getpshared F
|
||||
GLIBC_2.38 pthread_mutexattr_gettype F
|
||||
GLIBC_2.38 pthread_mutexattr_init F
|
||||
GLIBC_2.38 pthread_mutexattr_setprotocol F
|
||||
GLIBC_2.38 pthread_mutexattr_setpshared F
|
||||
GLIBC_2.38 pthread_mutexattr_settype F
|
||||
GLIBC_2.38 pthread_self F
|
||||
GLIBC_2.38 pthread_setcancelstate F
|
||||
|
@ -2217,8 +2219,11 @@ GLIBC_2.41 pthread_condattr_getpshared F
|
|||
GLIBC_2.41 pthread_condattr_setclock F
|
||||
GLIBC_2.41 pthread_condattr_setpshared F
|
||||
GLIBC_2.41 pthread_mutexattr_getprotocol F
|
||||
GLIBC_2.41 pthread_mutexattr_getpshared F
|
||||
GLIBC_2.41 pthread_mutexattr_gettype F
|
||||
GLIBC_2.41 pthread_mutexattr_setprotocol F
|
||||
GLIBC_2.41 pthread_mutexattr_setpshared F
|
||||
GLIBC_2.41 pthread_mutexattr_settype F
|
||||
GLIBC_2.41 pthread_sigmask F
|
||||
HURD_CTHREADS_0.3 __cthread_getspecific F
|
||||
HURD_CTHREADS_0.3 __cthread_keycreate F
|
||||
|
|
|
@ -74,11 +74,9 @@ GLIBC_2.38 pthread_mutex_transfer_np F
|
|||
GLIBC_2.38 pthread_mutex_trylock F
|
||||
GLIBC_2.38 pthread_mutex_unlock F
|
||||
GLIBC_2.38 pthread_mutexattr_getprioceiling F
|
||||
GLIBC_2.38 pthread_mutexattr_getpshared F
|
||||
GLIBC_2.38 pthread_mutexattr_getrobust F
|
||||
GLIBC_2.38 pthread_mutexattr_getrobust_np F
|
||||
GLIBC_2.38 pthread_mutexattr_setprioceiling F
|
||||
GLIBC_2.38 pthread_mutexattr_setpshared F
|
||||
GLIBC_2.38 pthread_mutexattr_setrobust F
|
||||
GLIBC_2.38 pthread_mutexattr_setrobust_np F
|
||||
GLIBC_2.38 pthread_once F
|
||||
|
|
Loading…
Add table
Reference in a new issue