Skip to contentSkip to conversation

Generic Mutex Subsystem, mutex-migration-helper-x86_64.patch

PATCH In review Ingo Molnar 2 participants 3 messages Dec 19, 2005

lore
Share & tools
lore
#0 lore raw

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
Index: linux/arch/x86_64/Kconfig
===================================================================
@@ -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

#1 lore raw
Quoted 3 lines · Ingo Molnar

introduce the arch_semaphore type on x86_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

#2 lore raw
Quoted 8 lines · Andi Kleen
Quoted 3 lines · Ingo Molnar

introduce the arch_semaphore type on x86_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?

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