reactor-uc 0.1
|
#include <platform.h>
Data Fields | |
lf_ret_t(* | initialize )(Platform *self) |
Perform any platform initialization such as initializing semaphores, configuring clocks, etc. | |
instant_t(* | get_physical_time )(Platform *self) |
Return the current physical time in nanoseconds. | |
lf_ret_t(* | wait_until )(Platform *self, instant_t wakeup_time) |
Put system to sleep until the wakeup time. | |
lf_ret_t(* | wait_for )(Platform *self, interval_t duration) |
Put system to sleep until the wakeup time. | |
lf_ret_t(* | wait_until_interruptible )(Platform *self, instant_t wakeup_time) |
Put the system to sleep until the wakeup time or until an asynchronous event occurs. | |
void(* | new_async_event )(Platform *self) |
Signal the occurrence of an asynchronous event. | |
void(* | enter_critical_section )(Platform *self) |
Enter and leave a critical section. | |
void(* | leave_critical_section )(Platform *self) |
void(* Platform::enter_critical_section) (Platform *self) |
Enter and leave a critical section.
This is used so that an asynchronous context such as an ISR or another thread can safely schedule an event onto the event queue.
instant_t(* Platform::get_physical_time) (Platform *self) |
Return the current physical time in nanoseconds.
lf_ret_t(* Platform::initialize) (Platform *self) |
Perform any platform initialization such as initializing semaphores, configuring clocks, etc.
Called once after construction.
void(* Platform::leave_critical_section) (Platform *self) |
void(* Platform::new_async_event) (Platform *self) |
Signal the occurrence of an asynchronous event.
This should wake up the platform if it is sleeping on wait_until_interruptible
.
lf_ret_t(* Platform::wait_for) (Platform *self, interval_t duration) |
Put system to sleep until the wakeup time.
Asynchronous events does not need to be handled.
lf_ret_t(* Platform::wait_until) (Platform *self, instant_t wakeup_time) |
Put system to sleep until the wakeup time.
Asynchronous events does not need to be handled.
lf_ret_t(* Platform::wait_until_interruptible) (Platform *self, instant_t wakeup_time) |
Put the system to sleep until the wakeup time or until an asynchronous event occurs.