Skip to contentSkip to conversation

question on powerpc pthread mutexes and memory barriers

DISCUSSION Chris Friesen 1 participant 2 messages Jul 9, 2009

lore
Share & tools
lore
#0 lore raw

Hi all,

This probably isn't the right place to ask about this, but does anyone know where the implied memory barrier happens for pthread mutexes in the uncontended case? I'm looking at the glibc code and I don't see any barrier instructions for mutexes, only semaphores and spinlocks.

Thanks,

Chris

#1 lore raw
Quoted 6 lines · Chris Friesen

Hi all,

This probably isn't the right place to ask about this, but does anyone know where the implied memory barrier happens for pthread mutexes in the uncontended case? I'm looking at the glibc code and I don't see any barrier instructions for mutexes, only semaphores and spinlocks.

Bad form to follow up on my own question, but I tracked it down. The
barriers are there hidden in the atomic macros.

Sorry for the noise.

Chris