Subj : Re: sem_getvalue (was Re: Using hierarchical memory ...) To : comp.programming.threads From : Alexander Terekhov Date : Mon Sep 12 2005 11:37 pm Joe Seigh wrote: > > Alexander Terekhov wrote: > > Joe Seigh wrote: > > [...] > > > >>>Conflation or non-conflation aside for a moment, I'm just curious how > >>>your lock-free sem_getvalue() for x86 would look like. Care to share? > >>> > >> > >>Depends. The documentation for that is a little strange and it's not > >>clear if sem_getvalue has any practical use. > > > > > > http://www.opengroup.org/austin/mailarchives/ag/msg08586.html > > > > > > Depends on what you think "synchronize memory" means for posix semaphores, I think it means much more stricter synchronization protocol than what it means for mutexes... due to semaphore value exposure, not mere locking as for mutexes. > what is actually observable, Semaphore operations (lock/unlock/getvalue) are meant to be fully-fenced and provide illusion of remote write atomicity. > and what you mean by "remote write atomicity". It's what makes PC (x86/WB) != TSO. regards, alexander. .