diff options
author | John Baldwin <jhb@FreeBSD.org> | 2003-12-17 21:13:04 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2003-12-17 21:13:04 +0000 |
commit | eb5b0e05655c0d9bf741be2f028202d604eafcb3 (patch) | |
tree | c1fd15641de5f1acc6a0b279b9bd9850a1b83f9f /sys/kern/subr_taskqueue.c | |
parent | f91e55b1e91f651b524f9ca1328a1adbc4a12e2c (diff) |
Notes
Diffstat (limited to 'sys/kern/subr_taskqueue.c')
-rw-r--r-- | sys/kern/subr_taskqueue.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/kern/subr_taskqueue.c b/sys/kern/subr_taskqueue.c index f5c74c2e66001..aeebd084cffd7 100644 --- a/sys/kern/subr_taskqueue.c +++ b/sys/kern/subr_taskqueue.c @@ -32,19 +32,17 @@ __FBSDID("$FreeBSD$"); #include <sys/bus.h> #include <sys/interrupt.h> #include <sys/kernel.h> +#include <sys/kthread.h> #include <sys/lock.h> #include <sys/malloc.h> #include <sys/mutex.h> #include <sys/taskqueue.h> -#include <sys/kthread.h> #include <sys/unistd.h> static MALLOC_DEFINE(M_TASKQUEUE, "taskqueue", "Task Queues"); - -static STAILQ_HEAD(taskqueue_list, taskqueue) taskqueue_queues; - -static void *taskqueue_ih; static void *taskqueue_giant_ih; +static void *taskqueue_ih; +static STAILQ_HEAD(taskqueue_list, taskqueue) taskqueue_queues; static struct mtx taskqueue_queues_mutex; static struct proc *taskqueue_thread_proc; @@ -124,14 +122,14 @@ taskqueue_find(const char *name) mtx_lock(&taskqueue_queues_mutex); STAILQ_FOREACH(queue, &taskqueue_queues, tq_link) { mtx_lock(&queue->tq_mutex); - if (!strcmp(queue->tq_name, name)) { + if (strcmp(queue->tq_name, name) == 0) { mtx_unlock(&taskqueue_queues_mutex); return queue; } mtx_unlock(&queue->tq_mutex); } mtx_unlock(&taskqueue_queues_mutex); - return 0; + return NULL; } int |