Date: Sat, 16 Nov 2002 10:51:25 -0800 From: Marcel Moolenaar <marcel@xcllnt.net> To: Daniel Eischen <eischen@pcnet1.pcnet.com> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc_r/arch/ia64 _atomic_lock.S Message-ID: <20021116185125.GB618@dhcp01.pn.xcllnt.net> In-Reply-To: <Pine.GSO.4.10.10211161308020.20425-100000@pcnet1.pcnet.com> References: <200211161705.gAGH56v5058239@repoman.freebsd.org> <Pine.GSO.4.10.10211161308020.20425-100000@pcnet1.pcnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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... 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... -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net 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?20021116185125.GB618>