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

函数

int osal_delayedwork_init (osal_delayedwork *work, osal_delayedwork_handler handler)
 This API is used to initialization of delayedwork.
 
void osal_delayedwork_destroy (osal_delayedwork *work)
 This API is used to destroy the delayedwork.
 
int osal_delayedwork_schedule (osal_delayedwork *work, int timeout)
 put work task in global workqueue after delay.
 
int osal_delayedwork_cancel_sync (osal_delayedwork *work)
 cancel a delayed work and wait for it to finish.
 

详细描述

函数说明

◆ osal_delayedwork_cancel_sync()

int osal_delayedwork_cancel_sync ( osal_delayedwork work)

cancel a delayed work and wait for it to finish.

Description:
cancel a delayed work and wait for it to finish.
参数
work[in] The delayed work cancel.
返回
OSAL_SUCCESS/OSAL_FAILURE
Support System:
linux.

◆ osal_delayedwork_destroy()

void osal_delayedwork_destroy ( osal_delayedwork work)

This API is used to destroy the delayedwork.

Description:
This API is used to destroy the delayedwork.
参数
work[in] The delayedwork to be destroyed.
注意
this api may free memory, work should be from osal_delayedwork_init.
Support System:
linux.

◆ osal_delayedwork_init()

int osal_delayedwork_init ( osal_delayedwork work,
osal_delayedwork_handler  handler 
)

This API is used to initialization of delayedwork.

Description:
This API is used to initialization of delayedwork.
注意
Must be freed with osal_delayedwork_destroy.
参数
work[in/out] The delayedwork to be initialized.
handler[in/out] The delayedwork callback handler function.
返回
OSAL_SUCCESS/OSAL_FAILURE
Support System:
linux.

◆ osal_delayedwork_schedule()

int osal_delayedwork_schedule ( osal_delayedwork work,
int  timeout 
)

put work task in global workqueue after delay.

Description:
put work task in global workqueue after delay. After waiting for a given time this puts a job in the kernel-global workqueue.
参数
work[in] Job to be done.
timeout[in] Number of jiffies to wait or 0 for immediate execution.
返回
OSAL_SUCCESS/OSAL_FAILURE
Support System:
linux.