aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/htl/sem-init.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/htl/sem-init.c')
-rw-r--r--sysdeps/htl/sem-init.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sysdeps/htl/sem-init.c b/sysdeps/htl/sem-init.c
index 2be6ab449b..196846d311 100644
--- a/sysdeps/htl/sem-init.c
+++ b/sysdeps/htl/sem-init.c
@@ -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;
}