I just realized... how would a crippled spinlock implementation
protect the readers looking at the word?
The operation is decidely non-atomic, because only one side
of the access is being synchronized.
This is another reason you can't use cmpxchg like this and expect
every architecture to be able to do something reasonable.
Use instead some algorithm with xchg() which is supported on every
platform.
-
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/