I suppose you can simplify your interface when the code tracking the lock
holder (i.e. the address of the lock call) is there:
#define MUST_HOLD(lock) BUG_ON(!(lock)->holder)
is independent of whether lock is a spinlock or an rw_lock, so you
don't need MUST_HOLD_READ anymore. I'd even go as far as dropping
MUST_HOLD_WRITE as well, since it helps only in the corner case
where the lock is held but only for reading.
Arnd <><
-
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/