HTL_thread_executor_check_event
Processes events associated with the scheduler.
Interface Definition
int HTL_thread_executor_check_event(HTL_thread_scheduler_t scheduler);
Description
HTL_thread_executor_check_event() processes events associated with the scheduler. The calling worker must be associated with the scheduler.
This function is periodically executed only by the scheduler program. A user-defined scheduler should be periodically invoked in a scheduling cycle.
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
scheduler |
HTL_thread_scheduler_t |
Handle to the scheduler. |
Input |
Return Value
- HTL_THREAD_SUCCESS: success.
- Other values: failure. For details, see the error code descriptions.
Example
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);
}
}
Parent topic: Executor Functions