diff options
author | jhb <jhb@FreeBSD.org> | 2001-10-25 19:56:02 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-10-25 19:56:02 +0000 |
commit | 0857f7bbf90575b592c7770dcef6db0c7d9fc87c (patch) | |
tree | 63418400a34d1c0aa6ca44643c6e817e631ad727 /sys | |
parent | ac87229e1f55859f6e902b685af85563a93f5ddf (diff) | |
download | FreeBSD-src-0857f7bbf90575b592c7770dcef6db0c7d9fc87c.zip FreeBSD-src-0857f7bbf90575b592c7770dcef6db0c7d9fc87c.tar.gz |
Use TASK_INIT to initialize taskqueue task instead of violating the
abstraction.
Submitted by: Andrew Reiter <arr@watson.org>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/acpica/Osd/OsdSchedule.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/acpica/Osd/OsdSchedule.c b/sys/dev/acpica/Osd/OsdSchedule.c index b44671b..8a952df 100644 --- a/sys/dev/acpica/Osd/OsdSchedule.c +++ b/sys/dev/acpica/Osd/OsdSchedule.c @@ -64,6 +64,7 @@ ACPI_STATUS AcpiOsQueueForExecution(UINT32 Priority, OSD_EXECUTION_CALLBACK Function, void *Context) { struct acpi_task *at; + int pri; FUNCTION_TRACE(__func__); @@ -77,25 +78,24 @@ AcpiOsQueueForExecution(UINT32 Priority, OSD_EXECUTION_CALLBACK Function, void * at->at_function = Function; at->at_context = Context; - at->at_task.ta_func = AcpiOsExecuteQueue; - at->at_task.ta_context = at; switch (Priority) { case OSD_PRIORITY_GPE: - at->at_task.ta_priority = 4; + pri = 4; break; case OSD_PRIORITY_HIGH: - at->at_task.ta_priority = 3; + pri = 3; break; case OSD_PRIORITY_MED: - at->at_task.ta_priority = 2; + pri = 2; break; case OSD_PRIORITY_LO: - at->at_task.ta_priority = 1; + pri = 1; break; default: free(at, M_ACPITASK); return_ACPI_STATUS(AE_BAD_PARAMETER); } + TASK_INIT(&at->at_task, pri, AcpiOsExecuteQueue, at); taskqueue_enqueue(taskqueue_swi, (struct task *)at); return_ACPI_STATUS(AE_OK); |