LCOV - code coverage report
Current view: top level - include/linux - bottom_half.h (source / functions) Hit Total Coverage
Test: landlock.info Lines: 5 6 83.3 %
Date: 2021-04-22 12:43:58 Functions: 0 0 -

          Line data    Source code
       1             : /* SPDX-License-Identifier: GPL-2.0 */
       2             : #ifndef _LINUX_BH_H
       3             : #define _LINUX_BH_H
       4             : 
       5             : #include <linux/preempt.h>
       6             : 
       7             : #ifdef CONFIG_TRACE_IRQFLAGS
       8             : extern void __local_bh_disable_ip(unsigned long ip, unsigned int cnt);
       9             : #else
      10             : static __always_inline void __local_bh_disable_ip(unsigned long ip, unsigned int cnt)
      11             : {
      12             :         preempt_count_add(cnt);
      13             :         barrier();
      14             : }
      15             : #endif
      16             : 
      17       11865 : static inline void local_bh_disable(void)
      18             : {
      19       11865 :         __local_bh_disable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
      20           0 : }
      21             : 
      22             : extern void _local_bh_enable(void);
      23             : extern void __local_bh_enable_ip(unsigned long ip, unsigned int cnt);
      24             : 
      25             : static inline void local_bh_enable_ip(unsigned long ip)
      26             : {
      27             :         __local_bh_enable_ip(ip, SOFTIRQ_DISABLE_OFFSET);
      28             : }
      29             : 
      30       12984 : static inline void local_bh_enable(void)
      31             : {
      32       12984 :         __local_bh_enable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
      33        1379 : }
      34             : 
      35             : #endif /* _LINUX_BH_H */

Generated by: LCOV version 1.14