mirror of
https://github.com/opnsense/src.git
synced 2026-02-20 00:11:07 -05:00
Insert read memory barriers.
This commit is contained in:
parent
b834944105
commit
d22d46ce27
2 changed files with 2 additions and 1 deletions
|
|
@ -434,7 +434,7 @@ _libc_sem_post_compat(sem_t *sem)
|
|||
return ksem_post((*sem)->semid);
|
||||
|
||||
atomic_add_rel_int(&(*sem)->count, 1);
|
||||
|
||||
rmb();
|
||||
if ((*sem)->nwaiters)
|
||||
return _umtx_wake(&(*sem)->count);
|
||||
return (0);
|
||||
|
|
|
|||
|
|
@ -332,6 +332,7 @@ _sem_getvalue(sem_t * __restrict sem, int * __restrict sval)
|
|||
static __inline int
|
||||
usem_wake(struct _usem *sem)
|
||||
{
|
||||
rmb();
|
||||
if (!sem->_has_waiters)
|
||||
return (0);
|
||||
return _umtx_op(sem, UMTX_OP_SEM_WAKE, 0, NULL, NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue