implement rt_notify_init

This commit is contained in:
Chris Copeland 2023-08-07 22:08:59 -07:00
parent 04fda23858
commit bfd63dca94
Signed by: chrisnc
GPG Key ID: 14550DA72485DF30
1 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,11 @@
#include <rt/notify.h>
void rt_notify_init(struct rt_notify *note, uint32_t value)
{
rt_atomic_store(&note->value, value, RT_ATOMIC_RELAXED);
rt_sem_init_binary(&note->sem);
}
void rt_notify_post(struct rt_notify *note)
{
rt_sem_post(&note->sem);