The necessary internal data structures are initialized during system startup by
sysmon_task_queue_preinit(). Before actual usage, a machine-dependent procedure should finish the initialization by calling
sysmon_task_queue_init(). This will create a kernel thread that can be later halted by
sysmon_task_queue_fini(). All scheduled tasks are executed before the queue is halted.
The
sysmon_task_queue_sched() enqueues
func to be executed at the priority
pri. If
pri is 0, the scheduled function will be placed as the last element in the queue. The single argument passed to
func is specified by
arg.