Blame view

include/linux/bottom_half.h 803 Bytes
b24413180   Greg Kroah-Hartman   License cleanup: ...
1
  /* SPDX-License-Identifier: GPL-2.0 */
676dcb8bc   Andrew Morton   [PATCH] add botto...
2
3
  #ifndef _LINUX_BH_H
  #define _LINUX_BH_H
0bd3a173d   Peter Zijlstra   sched/preempt, lo...
4
  #include <linux/preempt.h>
0bd3a173d   Peter Zijlstra   sched/preempt, lo...
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  
  #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);
  }
676dcb8bc   Andrew Morton   [PATCH] add botto...
20
  extern void _local_bh_enable(void);
0bd3a173d   Peter Zijlstra   sched/preempt, lo...
21
22
23
24
25
26
27
28
29
30
31
  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);
  }
676dcb8bc   Andrew Morton   [PATCH] add botto...
32
33
  
  #endif /* _LINUX_BH_H */