This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS


On Mon, Jun 19, 2000 at 10:45:38AM -0700, Geoff Keating wrote:
> > Date: Mon, 19 Jun 2000 09:54:23 -0700
> > From: "H . J . Lu" <hjl@valinux.com>
> 
> > This patch implements HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS. It
> > is used by ia64.
> 
> Can you document what 'RELEASE_SEMANTICS' means?  Without it I doubt
> anyone could understand your patch.
> 

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.
---

As far as I know, it is only applied to ia64. Maybe some other archs
also have it.


-- 
H.J. Lu (hjl@gnu.org)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]