Function mutex_recursive_create

Source
pub unsafe extern "C" fn mutex_recursive_create() -> mutex_t
Expand description

Creates a recursive mutex which can be locked recursively by the owner.

\return A newly created recursive mutex.

\b Example: \code mutex_t mutex = mutex_recursive_create();

void task_fn(void* param) { while(1) { mutex_recursive_take(mutex, 1000); // critical section mutex_recursive_give(mutex); task_delay(1000); } } task_create(task_fn, (void*)“PROS”, TASK_PRIORITY_DEFAULT, TASK_STACK_DEPTH_DEFAULT, “task_fn”);

\endcode