From 0857f7bbf90575b592c7770dcef6db0c7d9fc87c Mon Sep 17 00:00:00 2001 From: jhb Date: Thu, 25 Oct 2001 19:56:02 +0000 Subject: Use TASK_INIT to initialize taskqueue task instead of violating the abstraction. Submitted by: Andrew Reiter --- sys/dev/acpica/Osd/OsdSchedule.c | 12 ++++++------ 1 file 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); -- cgit v1.1