DragonFly BSD
DragonFly commits List (threaded) for 2004-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/sys/i386/include


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Thu, 9 Dec 2004 02:49:26 +0100

On Wed, Dec 08, 2004 at 03:57:22PM -0800, Matthew Dillon wrote:
>     What's this for ?  Generally speaking I don't think we want to abstract
>     this.  Atomicy requirements for generation counters is going to be highly
>     dependant on the situation, all these functions will do is confuse 
>     matters.

The problem is that we don't have a useful set of atomic ops for 64bit
values. IMO we have the following constraints on _any_ kind of generation
counter:
1. It must be atomically incrementable.
2. It must be atomically fetchable with the constraint that the returned
   value is between the value before the _get function is called and the
   value after the _get function is called.
3. It must be possible to compare two counters.

This is what I tried to provide, with the possibility to just implement
it via atomic instructions on platforms providing those.

Joerg



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]