git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Temporarily move taskq+util to libzpool until that directory is broken in to lib...
[zfs.git]
/
zfs
/
lib
/
libzpool
/
taskq.c
diff --git
a/zfs/lib/libzpool/taskq.c
b/zfs/lib/libzpool/taskq.c
index
6f6cfc2
..
93acdcf
100644
(file)
--- a/
zfs/lib/libzpool/taskq.c
+++ b/
zfs/lib/libzpool/taskq.c
@@
-19,15
+19,14
@@
* CDDL HEADER END
*/
/*
* CDDL HEADER END
*/
/*
- * Copyright 200
7
Sun Microsystems, Inc. All rights reserved.
+ * Copyright 200
8
Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
* Use is subject to license terms.
*/
-
-
#include <sys/zfs_context.h>
int taskq_now;
#include <sys/zfs_context.h>
int taskq_now;
+taskq_t *system_taskq;
typedef struct task {
struct task *task_next;
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++)
}
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);
}
return (tq);
}
@@
-227,7
+226,7
@@
taskq_destroy(taskq_t *tq)
mutex_exit(&tq->tq_lock);
for (t = 0; t < nthreads; t++)
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));
kmem_free(tq->tq_threadlist, nthreads * sizeof (thread_t));
@@
-253,3
+252,10
@@
taskq_member(taskq_t *tq, void *t)
return (0);
}
return (0);
}
+
+void
+system_taskq_init(void)
+{
+ system_taskq = taskq_create("system_taskq", 64, minclsyspri, 4, 512,
+ TASKQ_DYNAMIC | TASKQ_PREPOPULATE);
+}