sem_post() requires to return -1 on error.

This commit is contained in:
David Xu 2008-01-07 02:26:29 +00:00
parent f09b75d98b
commit 0c921dadbb

View File

@ -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);
}