mirror of
https://sourceware.org/git/glibc.git
synced 2025-10-28 23:34:53 +03:00
Remove futex_supports_pshared
Both NPTL and HTL support PTHREAD_PROCESS_SHARED, and since the removal of the NaCL port there are no other pthread implementations.
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
#include <shlib-compat.h>
|
||||
#include "semaphoreP.h"
|
||||
#include <kernel-features.h>
|
||||
#include <futex-internal.h>
|
||||
|
||||
|
||||
int
|
||||
@@ -34,13 +33,6 @@ __new_sem_init (sem_t *sem, int pshared, unsigned int value)
|
||||
__set_errno (EINVAL);
|
||||
return -1;
|
||||
}
|
||||
pshared = pshared != 0 ? PTHREAD_PROCESS_SHARED : PTHREAD_PROCESS_PRIVATE;
|
||||
int err = futex_supports_pshared (pshared);
|
||||
if (err != 0)
|
||||
{
|
||||
__set_errno (err);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Map to the internal type. */
|
||||
struct new_sem *isem = (struct new_sem *) sem;
|
||||
@@ -55,8 +47,7 @@ __new_sem_init (sem_t *sem, int pshared, unsigned int value)
|
||||
isem->nwaiters = 0;
|
||||
#endif
|
||||
|
||||
isem->private = (pshared == PTHREAD_PROCESS_PRIVATE
|
||||
? FUTEX_PRIVATE : FUTEX_SHARED);
|
||||
isem->private = (pshared == 0 ? FUTEX_PRIVATE : FUTEX_SHARED);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user