posis/semaphore: use sema_get_value()
This commit is contained in:
parent
7b0c5f9d5d
commit
606bcd66da
@ -283,7 +283,7 @@ static inline int sem_trywait(sem_t *sem)
|
|||||||
static inline int sem_getvalue(sem_t *sem, int *sval)
|
static inline int sem_getvalue(sem_t *sem, int *sval)
|
||||||
{
|
{
|
||||||
if (sem != NULL) {
|
if (sem != NULL) {
|
||||||
*sval = (int)sem->value;
|
*sval = (int)sema_get_value((sema_t *)sem);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user