Patch: HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS

Richard Henderson rth@twiddle.net
Wed Jun 21 16:04:00 GMT 2000


On Mon, Jun 19, 2000 at 10:54:19AM -0700, H . J . Lu wrote:
> That is from the discussion of linuxthreads under ia64:
> 
> ---
> The fundamental problem is that bith __pthread_lock and __pthread_unlock use
> compare_and_swap as the underlying synchronization primitive.  The problem
> is that, in IA64 terms, __pthread_lock wants acquire semantics (i.e. it
> completes befor subsequent writes) where __pthread_unlock wants release
> semantics (it completes after previous writes).  Currently there is only one
> compare_and_swap, and it has release semantics.
> ---

Actually, this is isn't right -- unless we give folks access to the
full complement of lock and unlock routines, we want full-stop semantics.


r~


More information about the Libc-hacker mailing list