mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
htl: Add pshared semaphore support
The implementation is extremely similar to the nptl implementation, but with slight differences in the futex interface. This fixes some of BZ 25521.
This commit is contained in:
@@ -24,12 +24,6 @@
|
||||
int
|
||||
__sem_init (sem_t *sem, int pshared, unsigned value)
|
||||
{
|
||||
if (pshared != 0)
|
||||
{
|
||||
errno = EOPNOTSUPP;
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef SEM_VALUE_MAX
|
||||
if (value > SEM_VALUE_MAX)
|
||||
{
|
||||
@@ -38,7 +32,9 @@ __sem_init (sem_t *sem, int pshared, unsigned value)
|
||||
}
|
||||
#endif
|
||||
|
||||
*sem = (sem_t) __SEMAPHORE_INITIALIZER (pshared, value);
|
||||
struct new_sem *isem = (struct new_sem *) sem;
|
||||
|
||||
*isem = (struct new_sem) __SEMAPHORE_INITIALIZER (value, pshared);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user