HTL_thread_executor_check_event
处理与调度器关联的事件。
接口定义
int HTL_thread_executor_check_event(HTL_thread_scheduler_t scheduler);
描述
HTL_thread_executor_check_event()处理与调度器scheduler关联的事件。正在调用的工作单元需与scheduler相关联。
该函数仅由调度器程序定期执行,如用户自定义的调度器应该在调度循环中定期调用。
参数
参数名  | 
类型  | 
描述  | 
输入/输出  | 
|---|---|---|---|
scheduler  | 
HTL_thread_scheduler_t  | 
调度器句柄。  | 
输入  | 
返回值
- HTL_THREAD_SUCCESS:成功。
 - 其他:失败。见错误码定义。
 
示例
1 2 3 4 5 6 7 8 9 10  | while (1) { ... if (++work_count >= p_data->event_freq) { work_count = 0; HTL_thread_scheduler_stop(sched, &stop); if (stop == true) break; HTL_thread_executor_check_event(sched); } }  | 
父主题: 执行器函数