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: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 8 Dec 2004 19:20:37 -0800 (PST)

: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
: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.

    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.

					Matthew Dillon 

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