#ifndef CX_ZIVUOS_IDLE_H_INCLUDED #define CX_ZIVUOS_IDLE_H_INCLUDED #include "zv_types.h" /** * That is type of IDLE worker function. It is called when all other * tasks are in waiting (not ready) state. * That function must analyze tasks stack, and check that any task * exists. If all task slots are empty, then IDLE worker would * return false. When tasks exists, but are not in ready state it * must return true. * * @param self Kernel to work on. * @return True when any task exists, false if not. */ typedef bool (*zv_idle_worker_t) (struct zv_kernel_s *); /** * That is default IDLE worker function. That check if any task exists on * task stack. It must be called from custom IDLE worker, if any custom * IDLE worker had been selected. * * @param self Kernel to work on. * @return True when any task exists, false when not. */ bool zv_idle_worker_check_tasks(struct zv_kernel_s *self); /** * Select zv_idle_worker_check_tasks as default IDLE worker. */ #define zv_idle_worker_default zv_idle_worker_check_tasks #endif