FreeRTOS port on GAP8/RISC-V
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pmsis_task.c File Reference

Functions

pi_task_t__pi_task_block (pi_task_t *callback_task)
 Prepare a blocking event task. More...
 
pi_task_t__pi_task_callback (pi_task_t *callback_task, pi_callback_func_t func, void *arg)
 
void __pi_task_destroy (pi_task_t *task)
 Delete an event task. More...
 
void __pi_task_wait_on (pi_task_t *task)
 Wait on an event task. More...
 
void __pi_task_push (pi_task_t *task)
 Push an event task. More...
 
pi_task_tpi_task_callback_no_mutex (pi_task_t *callback_task, pi_callback_func_t func, void *arg)
 
pi_task_tpi_task_block_no_mutex (pi_task_t *callback_task)
 
void pi_task_release (pi_task_t *task)
 
void pi_cl_pi_task_wait (pi_task_t *task)
 
void pi_cl_pi_task_notify_done (pi_task_t *task)
 
void pi_task_wait_on_no_mutex (pi_task_t *task)
 
void pi_task_push_delayed_us (pi_task_t *task, uint32_t delay)
 

Function Documentation

pi_task_t* __pi_task_block ( pi_task_t task)

This function initializes an instance of event task. A semaphore will be initialized.

Parameters
taskPointer to event task.
Returns
task This function returns the event task initialized.

References pi_task_t::core_id, pi_task_t::done, pi_task_t::id, pi_task_t::next, pi_sem_init(), pi_task_t::timeout, and pi_task_t::wait_on.

Referenced by pi_task_block().

pi_task_t* __pi_task_callback ( pi_task_t callback_task,
pi_callback_func_t  func,
void *  arg 
)
void __pi_task_destroy ( pi_task_t task)

This function removes an event task. It will delete the semaphore if it has been allocated.

Parameters
taskPointer to event task.

References hal_compiler_barrier(), pi_sem_deinit(), and pi_task_t::wait_on.

Referenced by __pi_task_wait_on(), and pi_task_destroy().

void __pi_task_push ( pi_task_t task)

This function is used to push an event task to the event kernel.

Parameters
taskPointer to event task.

References disable_irq(), pmsis_event_get_default_scheduler(), pmsis_event_push(), and restore_irq().

Referenced by pi_task_push().

void __pi_task_wait_on ( pi_task_t task)

This function allows to wait on an event task until the event occurs.

Parameters
taskPointer to event task.

References __pi_task_destroy(), DEBUG_PRINTF, pi_task_t::done, hal_compiler_barrier(), pi_sem_take(), and pi_task_t::wait_on.

Referenced by pi_task_wait_on().

void pi_cl_pi_task_notify_done ( pi_task_t task)
void pi_cl_pi_task_wait ( pi_task_t task)
pi_task_t* pi_task_callback_no_mutex ( pi_task_t callback_task,
pi_callback_func_t  func,
void *  arg 
)
void pi_task_push_delayed_us ( pi_task_t task,
uint32_t  delay 
)
void pi_task_wait_on_no_mutex ( pi_task_t task)