monoZ docs
Thread

-For CMSIS thread related APIs refer MZ_sys_cmsis_os2.h file. More...

Functions

uint8_t mz_thread_create (mz_thread_t *t, const char *name, mz_fn thread_func, void *const arg, mz_thread_prio_t prio, StackType_t *stack_mem, size_t stack_size, StaticTask_t *cb_mem, uint32_t cb_size)
 This function is used to check the message queue object validity Create a thread and add it to Active Threads. More...
 
uint8_t mz_thread_terminate (mz_thread_t *t)
 This function is used to terminate the execution of thread Terminate the execution of thread. More...
 
uint8_t mz_thread_yield (void)
 This function is used to pass control to the next thread that is in ready state. More...
 

Detailed Description

-For CMSIS thread related APIs refer MZ_sys_cmsis_os2.h file.

Function Documentation

◆ mz_thread_create()

uint8_t mz_thread_create ( mz_thread_t t,
const char *  name,
mz_fn  thread_func,
void *const  arg,
mz_thread_prio_t  prio,
StackType_t *  stack_mem,
size_t  stack_size,
StaticTask_t *  cb_mem,
uint32_t  cb_size 
)

This function is used to check the message queue object validity Create a thread and add it to Active Threads.

Parameters
tmz_thread_t
nameconst char
thread_funcmz_fn
argvoid * const
priomz_thread_prio_t
stack_memStackType_t
stack_sizesize_t
cb_memStaticTask_t
cb_sizeuint32_t
Returns
thread ID for reference by other functions or NULL in case of error.

◆ mz_thread_terminate()

uint8_t mz_thread_terminate ( mz_thread_t t)

This function is used to terminate the execution of thread Terminate the execution of thread.

Parameters
tmz_thread_t
Returns
1

◆ mz_thread_yield()

uint8_t mz_thread_yield ( void  )

This function is used to pass control to the next thread that is in ready state.

Pass control to next thread that is in state READY.

Returns
1