mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-16 20:02:35 +03:00
d1a5bee94f
git-svn-id: svn://kolibrios.org@5272 a494cfbc-eb01-0410-851d-a64ba20cac60
36 lines
796 B
C
36 lines
796 B
C
#ifndef _LINUX_BH_H
|
|
#define _LINUX_BH_H
|
|
|
|
#include <linux/preempt.h>
|
|
#include <linux/preempt_mask.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);
|
|
}
|
|
|
|
extern void _local_bh_enable(void);
|
|
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);
|
|
}
|
|
|
|
#endif /* _LINUX_BH_H */
|