1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

posis/semaphore: use sema_get_value()

This commit is contained in:
Hauke Petersen 2021-01-15 16:17:25 +01:00
parent 7b0c5f9d5d
commit 606bcd66da

View File

@ -283,7 +283,7 @@ static inline int sem_trywait(sem_t *sem)
static inline int sem_getvalue(sem_t *sem, int *sval)
{
if (sem != NULL) {
*sval = (int)sem->value;
*sval = (int)sema_get_value((sema_t *)sem);
return 0;
}
errno = EINVAL;