sem_post() requires to return -1 on error.
This commit is contained in:
parent
f09b75d98b
commit
0c921dadbb
@ -282,8 +282,8 @@ _sem_post(sem_t *sem)
|
||||
|
||||
if ((*sem)->nwaiters) {
|
||||
retval = _thr_umtx_wake(&(*sem)->count, 1);
|
||||
if (retval > 0)
|
||||
retval = 0;
|
||||
if (retval != 0)
|
||||
retval = -1;
|
||||
}
|
||||
return (retval);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user