WORKQUEUE_CREATE(9) NetBSD Kernel Developer's Manual WORKQUEUE_CREATE(9)
NAME
workqueue_create -- Create a workqueue
SYNOPSIS
#include <sys/workqueue.h> int workqueue_create(struct workqueue **wqp, const char *name, void (*func)(struct work *, void *), void *arg, pri_t prio, int ipl, int flags);
DESCRIPTION
workqueue_create() creates a workqueue. It takes the following argu- ments. wqp Specify where to store the created workqueue. name The name of the workqueue. func The function to be called for each work. arg An argument to be passed as a second argument of func. prio The process priority to be used when sleeping to wait requests. ipl The highest IPL at which this workqueue is used. flags The value of 0 indicates a standard create operation, however the following flags may be bitwise ORed together: WQ_MPSAFE Specifies that the workqueue is multiprocessor safe and does its own locking, otherwise the kernel lock will be held while work will be processed. WQ_PERCPU Specifies that the workqueue should have a separate queue for each CPU, thus the work could be enqueued on concrete CPUs.
RETURN VALUES
workqueue_create() returns 0 on success. Otherwise, it returns an errno(2).
SEE ALSO
errno(2), condvar(9), intro(9), workqueue(9) NetBSD 5.2 August 5, 2007 NetBSD 5.2
Powered by man-cgi (2024-08-26). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.