aos/include/aos/notificator.h
Daniel Schwyn 6d444bf552 Main handout
Signed-off-by: Daniel Schwyn <daniel.schwyn@inf.ethz.ch>
2022-03-03 14:57:51 +01:00

26 lines
591 B
C

#ifndef NOTIFICATOR_H
#define NOTIFICATOR_H
#include <aos/waitset.h>
#include <aos/aos.h>
#include <aos/dispatch.h>
typedef bool (*check_notification_fn_type)(void *object);
struct notificator
{
struct notificator *prev, *next;
void *object;
check_notification_fn_type can_read, can_write;
struct waitset_chanstate ready_to_read, ready_to_write;
};
void notificator_init(struct notificator *notificator, void *object,
check_notification_fn_type can_read, check_notification_fn_type can_write);
void check_notificators_disabled(dispatcher_handle_t handle);
#endif