Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Jul 2010 20:58:05 +0200
From:      Gabor PALI <pgj@FreeBSD.org>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        svn-src-head@freebsd.org
Subject:   Re: svn commit: r209119 - head/sys/sys
Message-ID:  <4C37713D.5060202@FreeBSD.org>
In-Reply-To: <alpine.BSF.2.00.1007091949170.94277@fledge.watson.org>
References:  <4C376B0E.9050505@FreeBSD.org> <alpine.BSF.2.00.1007091949170.94277@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07/09/10 20:50, Robert Watson wrote:
> I think I have an e-mail in my in queue from you suggesting an
> alternative approach that I haven't yet gotten to due to utter
> saturation here.

That is why I CC'ed svn-src-head@ :)  (But I do not see any sign whether
my last email reached it -- I am not an that list.)  I hope other
committers will help me with this, because I would like to use it in my
project, and I think it would be useful in general.


>   I assume there are reasonable alternatives that work around the
> potential race with a small probability of a missed or extra update,
> or similar, which would be fine.

In a few words: As far as I know, 64-bit atomic counters could be
implemented by using cmpxchg8b or by a plain uint64_t variable protected
by some kind of locking(9).


Cheers,
:g






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