OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-alpha/] [softirq.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#ifndef _ALPHA_SOFTIRQ_H
2
#define _ALPHA_SOFTIRQ_H
3
 
4
#include <linux/stddef.h>
5
#include <asm/atomic.h>
6
#include <asm/hardirq.h>
7
 
8
extern inline void cpu_bh_disable(int cpu)
9
{
10
        local_bh_count(cpu)++;
11
        barrier();
12
}
13
 
14
extern inline void __cpu_bh_enable(int cpu)
15
{
16
        barrier();
17
        local_bh_count(cpu)--;
18
}
19
 
20
#define __local_bh_enable()     __cpu_bh_enable(smp_processor_id())
21
#define local_bh_disable()      cpu_bh_disable(smp_processor_id())
22
 
23
#define local_bh_enable()                                       \
24
do {                                                            \
25
        int cpu;                                                \
26
                                                                \
27
        barrier();                                              \
28
        cpu = smp_processor_id();                               \
29
        if (!--local_bh_count(cpu) && softirq_pending(cpu))     \
30
                do_softirq();                                   \
31
} while (0)
32
 
33
#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
34
 
35
#endif /* _ALPHA_SOFTIRQ_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.