summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/gen/sem_new.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/gen/sem_new.c b/lib/libc/gen/sem_new.c
index 1ec39ba..f513973 100644
--- a/lib/libc/gen/sem_new.c
+++ b/lib/libc/gen/sem_new.c
@@ -255,6 +255,8 @@ _sem_close(sem_t *sem)
return (-1);
}
+ _pthread_once(&once, sem_module_init);
+
_pthread_mutex_lock(&sem_llock);
LIST_FOREACH(ni, &sem_list, next) {
if (sem == ni->sem) {
OpenPOWER on IntegriCloud