aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2006-01-14 01:55:24 +0000
committerScott Long <scottl@FreeBSD.org>2006-01-14 01:55:24 +0000
commit0f92108d32d89a5e9f1ec37a83ec13a85c616840 (patch)
treef5229c8522204692d0896701c0159d45163983de /sys/dev
parentc8250f086b52c3a495186b5c2d425eb77fa6bbc2 (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpica/Osd/OsdSchedule.c25
-rw-r--r--sys/dev/em/if_em.c10
2 files changed, 4 insertions, 31 deletions
diff --git a/sys/dev/acpica/Osd/OsdSchedule.c b/sys/dev/acpica/Osd/OsdSchedule.c
index f1e84e4de48b..1e8aecab2526 100644
--- a/sys/dev/acpica/Osd/OsdSchedule.c
+++ b/sys/dev/acpica/Osd/OsdSchedule.c
@@ -65,31 +65,8 @@ struct acpi_task_ctx {
void *at_context;
};
-/*
- * Private task queue definition for ACPI
- */
-static struct proc *
-acpi_task_start_threads(struct taskqueue **tqp)
-{
- struct proc *acpi_kthread_proc;
- int err, i;
-
- KASSERT(*tqp != NULL, ("acpi taskqueue not created before threads"));
-
- /* Start one or more threads to service our taskqueue. */
- for (i = 0; i < acpi_max_threads; i++) {
- err = kthread_create(taskqueue_thread_loop, tqp, &acpi_kthread_proc,
- 0, 0, "acpi_task%d", i);
- if (err) {
- printf("%s: kthread_create failed (%d)\n", __func__, err);
- break;
- }
- }
- return (acpi_kthread_proc);
-}
-
TASKQUEUE_DEFINE(acpi, taskqueue_thread_enqueue, &taskqueue_acpi,
- taskqueue_acpi_proc = acpi_task_start_threads(&taskqueue_acpi));
+ taskqueue_start_threads(&taskqueue_acpi, 3, PWAIT, "acpi_task"));
/*
* Bounce through this wrapper function since ACPI-CA doesn't understand
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c
index 676460aebfc7..33fdb44eb448 100644
--- a/sys/dev/em/if_em.c
+++ b/sys/dev/em/if_em.c
@@ -2053,13 +2053,9 @@ em_allocate_intr(struct adapter *adapter)
TASK_INIT(&adapter->link_task, 0, em_handle_link, adapter);
adapter->tq = taskqueue_create_fast("em_taskq", M_NOWAIT,
taskqueue_thread_enqueue,
- &adapter->tq, &adapter->tqproc);
- kthread_create(taskqueue_thread_loop,
- &adapter->tq, &adapter->tqproc,
- 0, 0, "%s taskq", device_get_nameunit(adapter->dev));
- mtx_lock_spin(&sched_lock);
- sched_prio(FIRST_THREAD_IN_PROC(adapter->tqproc), PI_NET);
- mtx_unlock_spin(&sched_lock);
+ &adapter->tq);
+ taskqueue_start_threads(&adapter->tq, 1, PI_NET, "%s taskq",
+ device_get_nameunit(adapter->dev));
}
#endif
if (adapter->int_handler_tag == NULL) {