FreeRTOS port on GAP8/RISC-V
|
Data Structures | |
struct | pmsis_event_scheduler_t |
struct | pmsis_event_kernel |
Macros | |
#define | DBG_PRINTF(...) |
Functions | |
static int | pmsis_event_lock_cl_to_fc (struct pmsis_event_kernel *evt_kernel) |
static void | pmsis_event_unlock_cl_to_fc (struct pmsis_event_kernel *evt_kernel, int irq_prev) |
static struct pmsis_event_kernel * | pmsis_event_wrap_get_kernel (struct pmsis_event_kernel_wrap *wrap) |
void | pmsis_event_lock_cl_to_fc_init (struct pmsis_event_kernel_wrap *wrap) |
static void | pmsis_event_wrap_set_kernel (struct pmsis_event_kernel_wrap *wrap, struct pmsis_event_kernel *event_kernel) |
static struct pmsis_event_scheduler * | pmsis_event_wrap_get_scheduler (struct pmsis_event_kernel_wrap *wrap) |
static void | pmsis_event_wrap_set_scheduler (struct pmsis_event_kernel_wrap *wrap, struct pmsis_event_scheduler *sched) |
void | pmsis_event_kernel_mutex_release (struct pmsis_event_kernel_wrap *wrap) |
static void | pmsis_event_release (struct pi_task *event) |
static void | pmsis_event_pop (struct pmsis_event_kernel *event_kernel, struct pi_task **event) |
int | pmsis_event_push (struct pmsis_event_kernel_wrap *wrap, pi_task_t *event) |
int | pmsis_event_kernel_init (struct pmsis_event_kernel_wrap **wrap, void(*event_kernel_entry)(void *)) |
static void | pmsis_event_kernel_exec_event (struct pmsis_event_kernel *kernel, struct pi_task *event) |
void | pmsis_event_kernel_main (void *arg) |
void | pmsis_event_kernel_destroy (struct pmsis_event_kernel_wrap **wrap) |
struct pmsis_event_kernel_wrap * | pmsis_event_get_default_scheduler (void) |
void | pmsis_event_set_default_scheduler (struct pmsis_event_kernel_wrap *wrap) |
void | pmsis_event_destroy_default_scheduler (struct pmsis_event_kernel_wrap *wrap) |
Variables | |
PI_FC_L1 struct pmsis_event_kernel_wrap * | default_sched |
static char | g_event_kernel_name_s [] |
#define DBG_PRINTF | ( | ... | ) |
void pmsis_event_destroy_default_scheduler | ( | struct pmsis_event_kernel_wrap * | wrap | ) |
References DBG_PRINTF, and pmsis_event_kernel_destroy().
struct pmsis_event_kernel_wrap* pmsis_event_get_default_scheduler | ( | void | ) |
References DBG_PRINTF, and default_sched.
Referenced by __pi_aes_event_handler_internal(), __pi_hyper_handle_end_of_task(), __pi_i2c_handle_error(), __pi_rtc_handler(), and __pi_task_push().
void pmsis_event_kernel_destroy | ( | struct pmsis_event_kernel_wrap ** | wrap | ) |
References DBG_PRINTF, disable_irq(), pmsis_event_kernel::event_sched_sem, pi_free(), pi_sem_deinit(), pmsis_event_wrap_get_kernel(), pmsis_event_wrap_get_scheduler(), pmsis_task_suspend(), restore_irq(), and pmsis_event_kernel::running.
Referenced by pi_cluster_close(), and pmsis_event_destroy_default_scheduler().
|
static |
References pmsis_event_release().
Referenced by pmsis_event_kernel_main().
int pmsis_event_kernel_init | ( | struct pmsis_event_kernel_wrap ** | wrap, |
void(*)(void *) | event_kernel_entry | ||
) |
Prepare the event kernel structure and task In particular, create inner private structure And setup synchronization mutexes
References g_event_kernel_name_s, pi_malloc(), pmsis_event_wrap_set_scheduler(), pmsis_task_create(), PMSIS_TASK_EVENT_KERNEL_PRIORITY, and printf.
Referenced by __os_native_kickoff(), and pi_cluster_open().
void pmsis_event_kernel_main | ( | void * | arg | ) |
References pmsis_event_kernel::event_sched_sem, pi_sem_init(), pmsis_event_kernel_exec_event(), pmsis_event_pop(), pmsis_event_wrap_get_kernel(), printf, and pmsis_event_kernel::running.
Referenced by __os_native_kickoff(), and pi_cluster_open().
void pmsis_event_kernel_mutex_release | ( | struct pmsis_event_kernel_wrap * | wrap | ) |
References pmsis_event_kernel::event_sched_sem, pi_sem_give(), and pmsis_event_wrap_get_kernel().
|
inlinestatic |
References disable_irq().
void pmsis_event_lock_cl_to_fc_init | ( | struct pmsis_event_kernel_wrap * | wrap | ) |
|
inlinestatic |
pop an event from the event FIFO, returns NULL if none available MAY SLEEP
References DBG_PRINTF, pmsis_event_kernel::event_sched_sem, pi_sem_take(), and pmsis_event_kernel::scheduler.
Referenced by pmsis_event_kernel_main().
int pmsis_event_push | ( | struct pmsis_event_kernel_wrap * | wrap, |
pi_task_t * | event | ||
) |
Might be called from cluster FC code, or ISR
References DBG_PRINTF, pmsis_event_kernel::event_sched_sem, pi_sem_give(), pmsis_event_wrap_get_kernel(), pmsis_event_wrap_get_scheduler(), and restore_irq().
Referenced by __pi_aes_event_handler_internal(), __pi_hyper_handle_end_of_task(), __pi_i2c_handle_error(), __pi_rtc_handler(), __pi_task_push(), and __spim_handle_end_of_transfer().
|
inlinestatic |
Release an active event from the FIFO list and push it on the free list if allocated_event_nb > max_event_nb the event will be freed instead
Get an event from the scheduler free list Returns NULL if none available
References DBG_PRINTF, disable_irq(), pi_task_release(), and restore_irq().
Referenced by pmsis_event_kernel_exec_event().
void pmsis_event_set_default_scheduler | ( | struct pmsis_event_kernel_wrap * | wrap | ) |
References DBG_PRINTF, and default_sched.
Referenced by __os_native_kickoff().
|
inlinestatic |
References restore_irq().
|
static |
|
static |
References pmsis_event_wrap_get_kernel(), and pmsis_event_kernel::scheduler.
Referenced by pmsis_event_kernel_destroy(), and pmsis_event_push().
|
inlinestatic |
|
inlinestatic |
References pmsis_event_wrap_get_kernel(), and pmsis_event_kernel::scheduler.
Referenced by pmsis_event_kernel_init().
PI_FC_L1 struct pmsis_event_kernel_wrap* default_sched |
|
static |
Referenced by pmsis_event_kernel_init().