X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=zfs%2Flib%2Flibzpool%2Ftaskq.c;h=93acdcf8e4e37e136a8ef9c89c7d606f28595e02;hb=48343be6a309efe3787ed8c539f10b376ece5ef8;hp=6f6cfc26996357cd770a6200a478bbf848957d13;hpb=34dc7c2f2553220ebc6e29ca195fb6d57155f95f;p=zfs.git diff --git a/zfs/lib/libzpool/taskq.c b/zfs/lib/libzpool/taskq.c index 6f6cfc2..93acdcf 100644 --- a/zfs/lib/libzpool/taskq.c +++ b/zfs/lib/libzpool/taskq.c @@ -19,15 +19,14 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - - #include int taskq_now; +taskq_t *system_taskq; typedef struct task { struct task *task_next; @@ -196,8 +195,8 @@ taskq_create(const char *name, int nthreads, pri_t pri, } for (t = 0; t < nthreads; t++) - VERIFY(thr_create(0, 0, taskq_thread, - tq, THR_BOUND, &tq->tq_threadlist[t]) == 0); + (void) thr_create(0, 0, taskq_thread, + tq, THR_BOUND, &tq->tq_threadlist[t]); return (tq); } @@ -227,7 +226,7 @@ taskq_destroy(taskq_t *tq) mutex_exit(&tq->tq_lock); for (t = 0; t < nthreads; t++) - VERIFY(thr_join(tq->tq_threadlist[t], NULL, NULL) == 0); + (void) thr_join(tq->tq_threadlist[t], NULL, NULL); kmem_free(tq->tq_threadlist, nthreads * sizeof (thread_t)); @@ -253,3 +252,10 @@ taskq_member(taskq_t *tq, void *t) return (0); } + +void +system_taskq_init(void) +{ + system_taskq = taskq_create("system_taskq", 64, minclsyspri, 4, 512, + TASKQ_DYNAMIC | TASKQ_PREPOPULATE); +}