From owner-freebsd-current Tue Jan 16 19:10:30 2001 Delivered-To: freebsd-current@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 9F81237B401; Tue, 16 Jan 2001 19:10:13 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f0H3AAc03611; Tue, 16 Jan 2001 19:10:10 -0800 (PST) Date: Tue, 16 Jan 2001 19:10:10 -0800 From: Alfred Perlstein To: Bruce Evans Cc: Julian Elischer , John Baldwin , Peter Jeremy , current@FreeBSD.ORG, Mark Murray Subject: Re: Atomic breakage? Message-ID: <20010116191009.E7240@fw.wintelcom.net> References: <3A64AA23.30035A1C@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from bde@zeta.org.au on Wed, Jan 17, 2001 at 02:03:14PM +1100 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Bruce Evans [010116 19:03] wrote: > On Tue, 16 Jan 2001, Julian Elischer wrote: > > > Bruce Evans wrote: > > > I bother with 64-bit longs whether I need to or not :-). They get used on > > > i386's mainly in old code and interfaces that don't use typedefs. > > > Hopefully 64-bit scalars will never need to be accessed atomically. > > > > Too late. > > > > Many statistics in interfaces (i.e. bytes transmitted) are already 64 bit > > words. > > These don't use atomic operations (hint: no 64-bit atomic operations are > implemented on i386's). If they need to be atomic, then they must use > locks. Just wondering, can't you use 'LOCK addl' and then use 'LOCK addc'? add longword, add longword with carry? I know it would be pretty ugly, but it should work, no? -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message