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.0.1                    August 5, 2007                    NetBSD 5.0.1

You can also request any man page by name and (optionally) by section:

Command: 
Section: 
Architecture: 
Collection: 
 

Use the DEFAULT collection to view manual pages for third-party software.


©1994 Man-cgi 1.15, Panagiotis Christias <christia@softlab.ntua.gr>
©1996-2014 Modified for NetBSD by Kimmo Suominen