WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
osal_completion

函数

int osal_completion_init (osal_completion *com)
 Initialize a dynamically allocd completion.
 
void osal_complete (osal_completion *com)
 signals a single thread waiting on this completion.
 
void osal_wait_for_completion (osal_completion *com)
 waits for completion of a task.
 
unsigned long osal_wait_for_completion_timeout (osal_completion *com, unsigned long timeout)
 waits for completion of a task (w/timeout)
 
void osal_complete_all (osal_completion *com)
 signals all threads waiting on this completion.
 
void osal_complete_destory (osal_completion *com)
 free a dynamically allocd completion.
 

详细描述

函数说明

◆ osal_complete()

void osal_complete ( osal_completion com)

signals a single thread waiting on this completion.

Description:
This will wake up a single thread waiting on this completion. Threads will be awakened in the same order in which they were queued. If this function wakes up a task, it executes a full memory barrier before accessing the task state.
参数
com[in] holds the state of this particular completion
Support System:
linux liteos freertos.

◆ osal_complete_all()

void osal_complete_all ( osal_completion com)

signals all threads waiting on this completion.

Description:
This will wake up all threads waiting on this particular completion event. If this function wakes up a task, it executes a full memory barrier before accessing the task state.
参数
com[in] holds the state of this particular completion
Support System:
linux liteos.

◆ osal_complete_destory()

void osal_complete_destory ( osal_completion com)

free a dynamically allocd completion.

Description:
free a dynamically allocd completion.
参数
com[in] holds the state of this particular completion
注意
this API may free memory, com Must be from osal_complete_init
Support System:
linux liteos freertos.

◆ osal_completion_init()

int osal_completion_init ( osal_completion com)

Initialize a dynamically allocd completion.

参数
com[out] pointer to completion structure that is to be initialized
注意
Must be freed with osal_complete_destory.
返回
OSAL_SUCCESS/OSAL_FAILURE
Support System:
linux liteos freertos.

◆ osal_wait_for_completion()

void osal_wait_for_completion ( osal_completion com)

waits for completion of a task.

Description:
This waits to be signaled for completion of a specific task. It is NOT interruptible and there is no timeout.
参数
com[in] holds the state of this particular completion
Support System:
linux liteos freertos.

◆ osal_wait_for_completion_timeout()

unsigned long osal_wait_for_completion_timeout ( osal_completion com,
unsigned long  timeout 
)

waits for completion of a task (w/timeout)

Description:
This waits for either a completion of a specific task to be signaled or for a specified timeout to expire. The timeout is in jiffies. It is not interruptible.
参数
com[in] holds the state of this particular completion
timeout[in] jeffies in linux, tick in liteos
返回
return 0 if timed out, and positive (left time till timeout) if completed, or -1 if failed.
Support System:
linux liteos