Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Nov 2002 14:18:28 -0500 (EST)
From:      Daniel Eischen <eischen@pcnet1.pcnet.com>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libc_r/arch/ia64 _atomic_lock.S
Message-ID:  <Pine.GSO.4.10.10211161416480.15290-100000@pcnet1.pcnet.com>
In-Reply-To: <Pine.GSO.4.10.10211161411500.14431-100000@pcnet1.pcnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 16 Nov 2002, Daniel Eischen wrote:

> On Sat, 16 Nov 2002, Marcel Moolenaar wrote:
> 
> > On Sat, Nov 16, 2002 at 01:08:58PM -0500, Daniel Eischen wrote:
> > > > marcel      2002/11/16 09:05:06 PST
> > > > 
> > > >   Modified files:
> > > >     lib/libc_r/arch/ia64 _atomic_lock.S 
> > > >   Log:
> > > >   Implement the lock with a cmpxchg instruction instead of a xchg.
> > > >   Both are atomic, but the cmpxchg has memory ordering hints. We
> > > >   give this acquire semantics.
> > > >   
> > > >   NOTE: The unlock in libc_r is implemented by a "normal" assign
> > > >   statement. This is not correct on ia64 due to the memory ordering
> > > >   characteristics of the architecture. We need release semantics
> > > >   for an unlock.
> > > 
> > > We can fix that before 5.0 goes out.
> > 
> > That would be great. We can special-case ia64 by calling
> > _spinunlock(), which for libc_r resolves to _atomic_unlock()
> > which would have a single store with release semantics.
> > That way we don't pessimize archs with strong memory ordering.
> > 
> > If you want me to send patches, let me know. I'm trying to figure
> > out what to do now that the *context functions have been turned
> > into syscalls. It complicates things...
> 
> I'm working on converting libc_r to use *context() so don't
> worry about doing it yourself.
> 
> > BTW: Thanks for updating sys/ia64/ia32/syscalls.master. I haven't
> > seen the re-gen yet but don't worry about it. I'm behind on my
> > mail...
> 
> Oh, I didn't know I had to regen those.  I'll try and do it
> and if it's not obvious, I'll shoot you some email.

OK, what do I have to do?

  $ cd sys/ia64/ia32
  $ sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf

???

-- 
Dan Eischen


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10211161416480.15290-100000>