summaryrefslogtreecommitdiff
path: root/sys/kern/subr_taskqueue.c
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2003-02-26 03:15:42 +0000
committerScott Long <scottl@FreeBSD.org>2003-02-26 03:15:42 +0000
commit7874f606d5cefa443c96bc218d76d696db6f1a69 (patch)
treead64b7fff0868ef683f7e5764838fab2d311b965 /sys/kern/subr_taskqueue.c
parent13f9c3024f92dea14d1e7c1f58d132c3e460bb5f (diff)
Notes
Diffstat (limited to 'sys/kern/subr_taskqueue.c')
-rw-r--r--sys/kern/subr_taskqueue.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/sys/kern/subr_taskqueue.c b/sys/kern/subr_taskqueue.c
index 28fbe38735641..8cccc8d615935 100644
--- a/sys/kern/subr_taskqueue.c
+++ b/sys/kern/subr_taskqueue.c
@@ -41,6 +41,7 @@ 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 struct mtx taskqueue_queues_mutex;
struct taskqueue {
@@ -219,6 +220,22 @@ taskqueue_swi_run(void *dummy)
taskqueue_run(taskqueue_swi);
}
+static void
+taskqueue_swi_giant_enqueue(void *context)
+{
+ swi_sched(taskqueue_giant_ih, 0);
+}
+
+static void
+taskqueue_swi_giant_run(void *dummy)
+{
+ taskqueue_run(taskqueue_swi_giant);
+}
+
TASKQUEUE_DEFINE(swi, taskqueue_swi_enqueue, 0,
- swi_add(NULL, "task queue", taskqueue_swi_run, NULL, SWI_TQ, 0,
- &taskqueue_ih));
+ swi_add(NULL, "task queue", taskqueue_swi_run, NULL, SWI_TQ,
+ INTR_MPSAFE, &taskqueue_ih));
+
+TASKQUEUE_DEFINE(swi_giant, taskqueue_swi_giant_enqueue, 0,
+ swi_add(NULL, "Giant task queue", taskqueue_swi_giant_run,
+ NULL, SWI_TQ_GIANT, 0, &taskqueue_giant_ih));