From owner-freebsd-arch@FreeBSD.ORG Mon May 24 13:25:59 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08ADE16A4CE; Mon, 24 May 2004 13:25:59 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87E1243D3F; Mon, 24 May 2004 13:25:58 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id i4OKPq8Q014789; Mon, 24 May 2004 16:25:52 -0400 (EDT) Date: Mon, 24 May 2004 16:25:52 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: John Baldwin In-Reply-To: <200405241459.04503.jhb@FreeBSD.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: arch@FreeBSD.org cc: mtm@FreeBSD.org cc: Garance A Drosihn cc: Julian Elischer cc: freebsd-arch@FreeBSD.org Subject: Re: atomic reference counting primatives. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 May 2004 20:25:59 -0000 On Mon, 24 May 2004, John Baldwin wrote: > On Monday 24 May 2004 10:50 am, Daniel Eischen wrote: > > On Mon, 24 May 2004, John Baldwin wrote: > > > atomic_cmpset() is an "official" primitive. The problem is that Mike is > > > using an enum and assuming that all enum's are ints which is not > > > necessarily true. The code should perhaps use an int with #define's > > > instead to guarantee that the variable is an int and not a short, char, > > > or long. > > > > You can't use atomic_cmpset() in userland on 386, so > > if it is being used in libthr, the machine must be > > checked to make sure it will work, otherwise should > > fall back to something else... > > I'd be fine with it being a compile option to be honest. We already don't > support 80386's out of the box since they need a custom kernel. I'd rather > not pessimize world + dog for the 80386. I'm not too concerned about whether it is a compile or run-time option, just that the code doesn't rely on having that operation in order to work. Unless we just throw up our hands and say libfoo isn't supported on 386... -- Dan Eischen