Re: [patch 1/2] kernel: introduce brlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux