2006-12-07 04:31:30 +00:00
|
|
|
#ifndef _LINUX_BH_H
|
|
|
|
#define _LINUX_BH_H
|
|
|
|
|
2013-11-19 15:13:38 +00:00
|
|
|
#include <linux/preempt.h>
|
|
|
|
|
|
|
|
#ifdef CONFIG_TRACE_IRQFLAGS
|
|
|
|
extern void __local_bh_disable_ip(unsigned long ip, unsigned int cnt);
|
|
|
|
#else
|
|
|
|
static __always_inline void __local_bh_disable_ip(unsigned long ip, unsigned int cnt)
|
|
|
|
{
|
|
|
|
preempt_count_add(cnt);
|
|
|
|
barrier();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static inline void local_bh_disable(void)
|
|
|
|
{
|
|
|
|
__local_bh_disable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
|
|
|
|
}
|
|
|
|
|
2006-12-07 04:31:30 +00:00
|
|
|
extern void _local_bh_enable(void);
|
2013-11-19 15:13:38 +00:00
|
|
|
extern void __local_bh_enable_ip(unsigned long ip, unsigned int cnt);
|
|
|
|
|
|
|
|
static inline void local_bh_enable_ip(unsigned long ip)
|
|
|
|
{
|
|
|
|
__local_bh_enable_ip(ip, SOFTIRQ_DISABLE_OFFSET);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void local_bh_enable(void)
|
|
|
|
{
|
|
|
|
__local_bh_enable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
|
|
|
|
}
|
2006-12-07 04:31:30 +00:00
|
|
|
|
|
|
|
#endif /* _LINUX_BH_H */
|