The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/include/asm-mips64/softirq.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * This file is subject to the terms and conditions of the GNU General Public
    3  * License.  See the file "COPYING" in the main directory of this archive
    4  * for more details.
    5  *
    6  * Copyright (C) 1997, 1998, 1999, 2000, 2001 by Ralf Baechle
    7  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
    8  * Copyright (C) 2001 MIPS Technologies, Inc.
    9  */
   10 #ifndef _ASM_SOFTIRQ_H
   11 #define _ASM_SOFTIRQ_H
   12 
   13 #include <asm/atomic.h>
   14 #include <asm/hardirq.h>
   15 
   16 static inline void cpu_bh_disable(int cpu)
   17 {
   18         local_bh_count(cpu)++;
   19         barrier();
   20 }
   21 
   22 static inline void __cpu_bh_enable(int cpu)
   23 {
   24         barrier();
   25         local_bh_count(cpu)--;
   26 }
   27 
   28 #define local_bh_disable()      cpu_bh_disable(smp_processor_id())
   29 #define __local_bh_enable()     __cpu_bh_enable(smp_processor_id())
   30 #define local_bh_enable()                                       \
   31 do {                                                            \
   32         int cpu;                                                \
   33                                                                 \
   34         barrier();                                              \
   35         cpu = smp_processor_id();                               \
   36         if (!--local_bh_count(cpu) && softirq_pending(cpu))     \
   37                 do_softirq();                                   \
   38 } while (0)
   39 
   40 #define in_softirq() (local_bh_count(smp_processor_id()) != 0)
   41 
   42 #endif /* _ASM_SOFTIRQ_H */

Cache object: b7678624daa3958dfd7f12a70a10aaa4


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.