From owner-freebsd-hackers Thu Jul 26 15:10:43 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from sharmas.dhs.org (cpe-66-1-147-119.ca.sprintbbd.net [66.1.147.119]) by hub.freebsd.org (Postfix) with ESMTP id 5D16037B401 for ; Thu, 26 Jul 2001 15:10:41 -0700 (PDT) (envelope-from adsharma@sharmas.dhs.org) Received: by sharmas.dhs.org (Postfix, from userid 500) id CBE315DD97; Thu, 26 Jul 2001 15:11:00 -0700 (PDT) Date: Thu, 26 Jul 2001 15:11:00 -0700 From: Arun Sharma To: Bernd Walter Cc: hackers@FreeBSD.ORG Subject: Re: Need a clean room implementation of this function Message-ID: <20010726151100.D23264@sharmas.dhs.org> References: <20010726135913.A23052@sharmas.dhs.org> <20010726231540.A2249@cicely20.cicely.de> <20010726142106.A23171@sharmas.dhs.org> <20010726235927.B2249@cicely20.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i In-Reply-To: <20010726235927.B2249@cicely20.cicely.de>; from ticso@mail.cicely.de on Thu, Jul 26, 2001 at 11:59:27PM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Jul 26, 2001 at 11:59:27PM +0200, Bernd Walter wrote: > [...] > ATOMIC_ASM(set, char, "orb %b2,%0", v) > ATOMIC_ASM(clear, char, "andb %b2,%0", ~v) > [...] That does set, not test-and-set. What I want is exactly what the Intel BTS instruction does: atomically test and set a bit. -Arun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message