kernels/linux-2.4.0/drivers/acpi/driver.c
/*
 * Queue for execution by the ACPI thread
 */
Queue for execution by the ACPI thread
Queue for execution by the ACPI thread
int
acpi_run(void (*callback)(void*), void *context)
{
	struct acpi_run_entry *entry;
	entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
	if (!entry)
		return -1;
	memset(entry, 0, sizeof(entry));
	entry->callback = callback;
	entry->context = context;
	entry->task.routine = acpi_run_exec;
	entry->task.data = entry;
	queue_task(&entry->task, &acpi_thread_run);
	if (waitqueue_active(&acpi_thread_wait))
		wake_up(&acpi_thread_wait);
	return 0;
}
int acpi_run ( void ( * callback ) ( void * ) , void * context ) { struct acpi_run_entry * entry ; entry = kmalloc ( sizeof ( * entry ) , GFP_ATOMIC ) ; if ( ! entry ) return -1 ; memset ( entry , 0 , sizeof ( entry ) ) ; entry -> callback = callback ; entry -> context = context ; entry -> task . routine = acpi_run_exec ; entry -> task . data = entry ; queue_task ( & entry -> task , & acpi_thread_run ) ; if ( waitqueue_active ( & acpi_thread_wait ) ) wake_up ( & acpi_thread_wait ) ; return 0 ; }
Queue for execution by the ACPI thread
Queue for execution by the ACPI thread