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, int prio, int ipl, int flags);

DESCRIPTION
workqueue_create() creates a workqueue. It takes the following arguments.

wqp Specify where to store the created workqueue.

func
    The function to be called for each work.

arg An argument to be passed as a second argument of func.

name
    The name of the workqueue.

prio
    The process priority to be used when sleeping to wait requests.

ipl The highest IPL at which this workqueue is used.

flags
    Should be 0.

RETURN VALUES
workqueue_create() returns 0 on success. Otherwise, it returns an errno(2).

SEE ALSO
errno(2), intro(9), ltsleep(9), workqueue(9)

BUGS
Currently ipl is ignored and splhigh() is always used to protect the queue.