On 2010-03-16, at 06:22, Nick Piggin wrote:
+#define DEFINE_BRLOCK(name) \ + DEFINE_PER_CPU(spinlock_t, name##_lock); \ + void name##_lock_init(void) { \ + void name##_wlock(void) { \ + void name##_wunlock(void) { \ + int name##_atomic_dec_and_wlock__failed(atomic_t *a) {
What makes these macros unpleasant is that it is no longer possible to tag to the implementation to see what it does, since there is no real declaration for these locks.
Is it possible to change the macros to take the lock name as a parameter, like normal lock/unlock functions do, and then have a single declaration for br_lock_init(), br_wlock(), etc. macros?
Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html