patch-2.4.22 linux-2.4.22/include/linux/netfilter_ipv4/lockhelp.h
Next file: linux-2.4.22/include/linux/nfs.h
Previous file: linux-2.4.22/include/linux/netfilter_ipv4/listhelp.h
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
2003-08-25 04:44:44.000000000 -0700
- Orig file:
linux-2.4.21/include/linux/netfilter_ipv4/lockhelp.h
- Orig date:
2001-01-01 10:37:41.000000000 -0800
diff -urN linux-2.4.21/include/linux/netfilter_ipv4/lockhelp.h linux-2.4.22/include/linux/netfilter_ipv4/lockhelp.h
@@ -42,22 +42,22 @@
printk("ASSERT %s:%u %s locked\n", __FILE__, __LINE__, #l); \
} while(0)
-/* Write locked OK as well. */ \
+/* Write locked OK as well. */
#define MUST_BE_READ_LOCKED(l) \
-do { if (!((l)->read_locked_map & (1 << smp_processor_id())) \
- && !((l)->write_locked_map & (1 << smp_processor_id()))) \
+do { if (!((l)->read_locked_map & (1UL << smp_processor_id())) \
+ && !((l)->write_locked_map & (1UL << smp_processor_id()))) \
printk("ASSERT %s:%u %s not readlocked\n", __FILE__, __LINE__, #l); \
} while(0)
#define MUST_BE_WRITE_LOCKED(l) \
-do { if (!((l)->write_locked_map & (1 << smp_processor_id()))) \
+do { if (!((l)->write_locked_map & (1UL << smp_processor_id()))) \
printk("ASSERT %s:%u %s not writelocked\n", __FILE__, __LINE__, #l); \
} while(0)
#define MUST_BE_READ_WRITE_UNLOCKED(l) \
-do { if ((l)->read_locked_map & (1 << smp_processor_id())) \
+do { if ((l)->read_locked_map & (1UL << smp_processor_id())) \
printk("ASSERT %s:%u %s readlocked\n", __FILE__, __LINE__, #l); \
- else if ((l)->write_locked_map & (1 << smp_processor_id())) \
+ else if ((l)->write_locked_map & (1UL << smp_processor_id())) \
printk("ASSERT %s:%u %s writelocked\n", __FILE__, __LINE__, #l); \
} while(0)
@@ -91,7 +91,7 @@
#define READ_UNLOCK(lk) \
do { \
- if (!((lk)->read_locked_map & (1 << smp_processor_id()))) \
+ if (!((lk)->read_locked_map & (1UL << smp_processor_id()))) \
printk("ASSERT: %s:%u %s not readlocked\n", \
__FILE__, __LINE__, #lk); \
clear_bit(smp_processor_id(), &(lk)->read_locked_map); \
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)