diff options
Diffstat (limited to 'sysdeps/pthread/sem_open.c')
-rw-r--r-- | sysdeps/pthread/sem_open.c | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/sysdeps/pthread/sem_open.c b/sysdeps/pthread/sem_open.c index e5eacb5..143b60a 100644 --- a/sysdeps/pthread/sem_open.c +++ b/sysdeps/pthread/sem_open.c @@ -23,15 +23,9 @@ #include "semaphoreP.h" #include <shm-directory.h> #include <sem_routines.h> -#include <futex-internal.h> #include <libc-lock.h> - - -#if !PTHREAD_IN_LIBC -/* The private names are not exported from libc. */ -# define __link link -# define __unlink unlink -#endif +#include <string.h> +#include <shlib-compat.h> #define SEM_OPEN_FLAGS (O_RDWR | O_NOFOLLOW | O_CLOEXEC) @@ -41,14 +35,6 @@ __sem_open (const char *name, int oflag, ...) int fd; sem_t *result; - /* Check that shared futexes are supported. */ - int err = futex_supports_pshared (PTHREAD_PROCESS_SHARED); - if (err != 0) - { - __set_errno (err); - return SEM_FAILED; - } - struct shmdir_name dirname; int ret = __shm_get_name (&dirname, name, true); if (ret != 0) @@ -215,11 +201,14 @@ out: return result; } -#if PTHREAD_IN_LIBC +#ifndef __PTHREAD_HTL versioned_symbol (libc, __sem_open, sem_open, GLIBC_2_34); # if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1_1, GLIBC_2_34) compat_symbol (libpthread, __sem_open, sem_open, GLIBC_2_1_1); # endif -#else /* !PTHREAD_IN_LIBC */ -strong_alias (__sem_open, sem_open) +#else /* __PTHREAD_HTL */ +versioned_symbol (libc, __sem_open, sem_open, GLIBC_2_43); +# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libpthread, __sem_open, sem_open, GLIBC_2_12); +#endif #endif |