netlink: revert broken, broken "2-clause nla_ok()"
[linux-2.6/btrfs-unstable.git] / include / linux / bottom_half.h
blob8fdcb783197d723a60dc548114af08cd6de9ca88
1 #ifndef _LINUX_BH_H
2 #define _LINUX_BH_H
4 #include <linux/preempt.h>
6 #ifdef CONFIG_TRACE_IRQFLAGS
7 extern void __local_bh_disable_ip(unsigned long ip, unsigned int cnt);
8 #else
9 static __always_inline void __local_bh_disable_ip(unsigned long ip, unsigned int cnt)
11 preempt_count_add(cnt);
12 barrier();
14 #endif
16 static inline void local_bh_disable(void)
18 __local_bh_disable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
21 extern void _local_bh_enable(void);
22 extern void __local_bh_enable_ip(unsigned long ip, unsigned int cnt);
24 static inline void local_bh_enable_ip(unsigned long ip)
26 __local_bh_enable_ip(ip, SOFTIRQ_DISABLE_OFFSET);
29 static inline void local_bh_enable(void)
31 __local_bh_enable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
34 #endif /* _LINUX_BH_H */