Generic Mutex Subsystem, mutex-migration-helper-x86_64.patch
PATCH 9/15 Generic Mutex Subsystem, mutex-migration-helper-x86_64.patch
introduce the arch_semaphore type on x86_64, to ease migration to mutexes.
----
arch/x86_64/Kconfig | 4 ++ include/asm-x86_64/semaphore.h | 61 ++++++++++++++++++++++++++--------------- 2 files changed, 43 insertions(+), 22 deletions(-)
arch/x86_64/Kconfig +4 -0
@@ -28,6 +28,10 @@ config SEMAPHORE_SLEEPERS bool default y +config ARCH_SEMAPHORES + bool + default y + config MMU bool default y
include/asm-x86_64/semaphore.h +39 -22
134 lines not on this page · raw message
Quoted 3 lines · Ingo Molnar
introduce the
arch_semaphoretype onx86_64, to ease migration to mutexes.
As a small feedback I don't think the name arch_semaphore is very good because it means nothing. How about counting_semaphore which is what it actually is?
-Andi
Quoted 8 lines · Andi Kleen
Quoted 3 lines · Ingo Molnar
introduce the
arch_semaphoretype onx86_64, to ease migration to mutexes.As a small feedback I don't think the name
arch_semaphoreis very good because it means nothing. How aboutcounting_semaphorewhich is what it actually is?
yeah, this is one of the open issues, and i have no strong preference for any of the naming variants. I considered two things when i went for the 'arch_semaphore' name:
1) the name should be temporary, and we could make it 'struct semaphore' once the transition phase is over. Linus is totally correct suggesting that there's nothing wrong about the 'struct semaphore' name. It just happens to clash with my intended type-based categorization of 'known counting semaphores' from 'unknown semaphores'.
2) i wanted to signal that this is the per-arch semaphore implementation.
another candidate name was 'struct __semaphore'. I like 'struct counting_semaphore' too, but maybe it's a bit too long as a name? Anyway, i'm very much open to suggestions how to name it best.
Ingo