tizthread

group tizthread

Simple thread/task management wrapper functions.

Typedefs

typedef OMX_U32 tiz_thread_t

Thread hdl

Functions

OMX_ERRORTYPE tiz_thread_create(tiz_thread_t *ap_thread, size_t a_stack_size, OMX_U32 a_priority, OMX_PTR (*a_pf_routine)(OMX_PTR), OMX_PTR ap_arg, )

Create a new thread, starting with execution of a_pf_routine getting passed ap_arg. The new hdl is stored in *ap_thread.

Return

OMX_ErrorNone if success, OMX_ErrorUndefined otherwise.

OMX_ERRORTYPE tiz_thread_join(tiz_thread_t *ap_thread, void **app_result)

Make the calling thread wait for the termination of the thread ap_thread. The exit status of the thread is stored in *app_result.

Return

OMX_ErrorNone if success, OMX_ErrorUndefined otherwise.

OMX_ERRORTYPE tiz_thread_setname(tiz_thread_t *ap_thread, const OMX_STRING a_name)

Set the name of a thread.

Return

0 if success, -1 otherwise.

void tiz_thread_exit(OMX_PTR a_status)

Terminate the calling thread.

OMX_S32 tiz_thread_id(void)

Get the thread id of the calling thread.

Return

The thread id

OMX_S32 tiz_sleep(OMX_U32 a_usec)

Sleep for the specified number of micro seconds.

Return

0 if success, -1 otherwise.