Also call sem_module_init in sem_close to initialize mutex

with some attributes.
This commit is contained in:
David Xu 2010-01-15 01:19:58 +00:00
parent 6f7be14a9a
commit 764ce7ce7d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=202326

View File

@ -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) {