RE: Fix unlock_buffer() to work the same way as bit_unlock()
From: Chen, Kenneth W
Date: Wed Mar 29 2006 - 18:45:34 EST
Christoph Lameter wrote on Wednesday, March 29, 2006 3:33 PM
> Hmmm... Maybe we therefore need to add a mode to each bit operation in
> the kernel?
>
> With that we can also get rid of the __* version of bitops.
>
> Possible modes are
>
> NON_ATOMIC Do not perform any atomic ops at all.
>
> ATOMIC Atomic but unordered
>
> ACQUIRE Atomic with acquire semantics (or lock semantics)
>
> RELEASE Atomic with release semantics (or unlock semantics)
>
> FENCE Atomic with full fence.
>
> This would require another bitops overhaul.
>
> Maybe we can preserve the existing code with bitops like __* mapped to
> *(..., NON_ATOMIC) and * mapped to *(..., FENCE) and the gradually fix the
> rest of the kernel.
Is gcc smart enough to turn constant argument and collapse inline of
inline function? I hope it does.
Lots of other comments on actual code, but I will defer that until
some consensus is made on the API. This would be nice to have.
- Ken
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/