On Sat, 2008-08-16 at 00:17 +0200, Andi Kleen wrote: > Daniel Walker wrote: > > The semaphore usage in ACPI is more like completions. The ASL > > functions getting implemented here are signals which follow a > > "wait for", signaled, or reset format. > > > > This implements the ACPI signaling methods with the Linux > > completion API, instead of using semaphores. > > NACK. I don't see the point of emulating semaphores when > there are already perfectly fine semaphores available. With semaphores as a super set, under that you have mutexes and completions, and other un-classified usages.. Mutex usage is obviously for mutual exclusion (semaphore initialized to 1), completions are used for signaling (semaphore initialized to 0). The semaphores in ACPI are specifically used in the initialized to 0 configuration (i.e. signaling). There are a total of three initialization locations of ACPI semaphores 1 186 drivers/acpi/executer/excreate.c <<acpi_ex_create_event>> 2 295 drivers/acpi/executer/exsystem.c <<acpi_ex_system_reset_event>> 3 216 drivers/acpi/namespace/nsaccess.c <<acpi_ns_root_initialize>> ACPI doesn't use semaphores, it uses completions .. Although the name semaphore remains, they are still completions. It should really be the inverse , why is ACPI using semaphores when we have perfectly good completions (specific tool for a specific job).. Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html