Just note that the implementation of these bit spinlocks will be
extremely expensive on some platforms that lack "compare and swap"
type instructions (or something similar like "load locked, store
conditional" as per mips/alpha).
Why not just use the existing bitops implementation? The code is
going to be mostly identical, ala:
while (test_and_set_bit(ptr, nr)) {
while (test_bit(ptr, nr))
barrier();
}
This makes less work for architectures to support this thing.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/