Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jul 2001 15:08:36 -0700
From:      Arun Sharma <arun@sharmas.dhs.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        hackers@FreeBSD.org
Subject:   Re: Need a clean room implementation of this function
Message-ID:  <20010726150836.C23264@sharmas.dhs.org>
In-Reply-To: <XFMail.010726144324.jhb@FreeBSD.org>; from jhb@FreeBSD.org on Thu, Jul 26, 2001 at 02:43:24PM -0700
References:  <20010726135913.A23052@sharmas.dhs.org> <XFMail.010726144324.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 26, 2001 at 02:43:24PM -0700, John Baldwin wrote:
> {
>         int val;
> 
>         do {
>                 val = *(int *)addr;
>         } while (atomic_cmpset_int(addr, val, val | (1 << nr) == 0);
>         return (val & (1 << nr));
> }

Thanks! I think that'd work. But code using BTS would be
more efficient (fewer cycles).

Many people asked me this question: the code I'm porting is:

http://www.intel.com/research/mrl/orp/

Please see my messages to java@freebsd.org about the port.

	-Arun


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010726150836.C23264>