diff options
author | pjd <pjd@FreeBSD.org> | 2009-08-18 13:55:48 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2009-08-18 13:55:48 +0000 |
commit | 099429aa324789b4d7ddacefdd2b9812b0579548 (patch) | |
tree | 3b8051efe67fb96978b5dfcb8c54a034239c9655 /sys/kern | |
parent | 4dfceb961eb98da9df84e23a8e629def2815a26b (diff) | |
download | FreeBSD-src-099429aa324789b4d7ddacefdd2b9812b0579548.zip FreeBSD-src-099429aa324789b4d7ddacefdd2b9812b0579548.tar.gz |
Remove unused taskqueue_find() function.
Reviewed by: dfr
Approved by: re (kib)
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/subr_taskqueue.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/sys/kern/subr_taskqueue.c b/sys/kern/subr_taskqueue.c index bec3b56..22c1809 100644 --- a/sys/kern/subr_taskqueue.c +++ b/sys/kern/subr_taskqueue.c @@ -45,11 +45,8 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_TASKQUEUE, "taskqueue", "Task Queues"); static void *taskqueue_giant_ih; static void *taskqueue_ih; -static STAILQ_HEAD(taskqueue_list, taskqueue) taskqueue_queues; -static struct mtx taskqueue_queues_mutex; struct taskqueue { - STAILQ_ENTRY(taskqueue) tq_link; STAILQ_HEAD(, task) tq_queue; const char *tq_name; taskqueue_enqueue_fn tq_enqueue; @@ -84,8 +81,6 @@ TQ_UNLOCK(struct taskqueue *tq) mtx_unlock(&tq->tq_mutex); } -static void init_taskqueue_list(void *data); - static __inline int TQ_SLEEP(struct taskqueue *tq, void *p, struct mtx *m, int pri, const char *wm, int t) @@ -95,16 +90,6 @@ TQ_SLEEP(struct taskqueue *tq, void *p, struct mtx *m, int pri, const char *wm, return (msleep(p, m, pri, wm, t)); } -static void -init_taskqueue_list(void *data __unused) -{ - - mtx_init(&taskqueue_queues_mutex, "taskqueue list", NULL, MTX_DEF); - STAILQ_INIT(&taskqueue_queues); -} -SYSINIT(taskqueue_list, SI_SUB_INTRINSIC, SI_ORDER_ANY, init_taskqueue_list, - NULL); - static struct taskqueue * _taskqueue_create(const char *name, int mflags, taskqueue_enqueue_fn enqueue, void *context, @@ -124,10 +109,6 @@ _taskqueue_create(const char *name, int mflags, queue->tq_flags |= TQ_FLAGS_ACTIVE; mtx_init(&queue->tq_mutex, mtxname, NULL, mtxflags); - mtx_lock(&taskqueue_queues_mutex); - STAILQ_INSERT_TAIL(&taskqueue_queues, queue, tq_link); - mtx_unlock(&taskqueue_queues_mutex); - return queue; } @@ -156,10 +137,6 @@ void taskqueue_free(struct taskqueue *queue) { - mtx_lock(&taskqueue_queues_mutex); - STAILQ_REMOVE(&taskqueue_queues, queue, taskqueue, tq_link); - mtx_unlock(&taskqueue_queues_mutex); - TQ_LOCK(queue); queue->tq_flags &= ~TQ_FLAGS_ACTIVE; taskqueue_run(queue); @@ -169,26 +146,6 @@ taskqueue_free(struct taskqueue *queue) free(queue, M_TASKQUEUE); } -/* - * Returns with the taskqueue locked. - */ -struct taskqueue * -taskqueue_find(const char *name) -{ - struct taskqueue *queue; - - mtx_lock(&taskqueue_queues_mutex); - STAILQ_FOREACH(queue, &taskqueue_queues, tq_link) { - if (strcmp(queue->tq_name, name) == 0) { - TQ_LOCK(queue); - mtx_unlock(&taskqueue_queues_mutex); - return queue; - } - } - mtx_unlock(&taskqueue_queues_mutex); - return NULL; -} - int taskqueue_enqueue(struct taskqueue *queue, struct task *task) { |