cvs commit: src/sys/i386/include

Matthew Dillon dillon at apollo.backplane.com
Wed Dec 8 19:21:58 PST 2004


: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

    There are no subsystems that need this API.  Name one and I will tell
    you how to write an algorithm that is critical section AND mutex free.

    In my entire life the only thing that has *EVER* needed a monotonically
    increasing generation number has been a transaction id for a database.
    And we don't have a database built into the kernel.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Commits mailing list