|Linux & Unix Commands - Search Man Pages
SYSMON_TASKQ(9) BSD Kernel Developer's Manual SYSMON_TASKQ(9)
sysmon_taskq -- general purpose system monitoring task queue
sysmon_task_queue_sched(u_int pri, void (*func)(void *), void *arg);
The machine-independent sysmon_taskq provides a simple general purpose task queue. It can
be used to run callbacks that require thread context, but do not warrant the use of a more
Although the intended usage is related to the context of system monitoring and power manage-
ment, also other comparable functions are suitable for sysmon_taskq.
The necessary internal data structures are initialized during system startup by
sysmon_task_queue_preinit(). Before actual usage, a machine-dependent procedure should fin-
ish 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 exe-
cuted 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 argu-
ment passed to func is specified by arg.
Upon successful completion, sysmon_task_queue_sched() returns 0. Otherwise, the following
error values are returned:
[EINVAL] An invalid parameter was specified.
[ENOMEM] There was not enough memory.
queue(3), kthread(9), workqueue(9)
Jason R. Thorpe <thorpej@NetBSD.org>
BSD January 24, 2010 BSD
All times are GMT -4. The time now is 07:59 AM.