cvs commit: src/sys/i386/include

Joerg Sonnenberger joerg at britannica.bec.de
Wed Dec 8 17:51:14 PST 2004


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





More information about the Commits mailing list