From owner-cvs-all Sat Nov 16 10:51:28 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 89E6F37B401; Sat, 16 Nov 2002 10:51:26 -0800 (PST) Received: from kayak.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A7D543E3B; Sat, 16 Nov 2002 10:51:25 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by kayak.xcllnt.net (8.12.6/8.12.6) with ESMTP id gAGIpO0N039541; Sat, 16 Nov 2002 10:51:24 -0800 (PST) (envelope-from marcel@kayak.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.6/8.12.6) with ESMTP id gAGIpPUq000970; Sat, 16 Nov 2002 10:51:25 -0800 (PST) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.6/8.12.6/Submit) id gAGIpPqU000969; Sat, 16 Nov 2002 10:51:25 -0800 (PST) (envelope-from marcel) Date: Sat, 16 Nov 2002 10:51:25 -0800 From: Marcel Moolenaar To: Daniel Eischen 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> References: <200211161705.gAGH56v5058239@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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