ARM: cpu topology: Add debugfs interface for cpu_power
[cmplus.git] / include / linux / jrcu.h
blob1c1d6a7059efbd02934c152d1e16c723da108f2c
1 /*
2 * JRCU - An RCU suitable for small SMP systems.
4 * Author: Joe Korty <joe.korty@ccur.com>
5 * Copyright Concurrent Computer Corporation, 2011
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 #ifndef __LINUX_JRCU_H
22 #define __LINUX_JRCU_H
24 #define __rcu_read_lock() preempt_disable()
25 #define __rcu_read_unlock() jrcu_read_unlock()
26 extern void jrcu_read_unlock(void);
28 #define __rcu_read_lock_bh() __rcu_read_lock()
29 #define __rcu_read_unlock_bh() __rcu_read_unlock()
31 extern void call_rcu_sched(struct rcu_head *head, void (*func)(struct rcu_head *rcu));
33 #define call_rcu_bh call_rcu_sched
34 #define call_rcu call_rcu_sched
36 extern void rcu_barrier(void);
38 #define rcu_barrier_sched rcu_barrier
39 #define rcu_barrier_bh rcu_barrier
41 extern void synchronize_sched(void);
43 #define synchronize_rcu synchronize_sched
44 #define synchronize_rcu_bh synchronize_sched
45 #define synchronize_rcu_expedited synchronize_sched
46 #define synchronize_rcu_bh_expedited synchronize_sched
47 #define synchronize_sched_expedited synchronize_sched
49 #define rcu_init(cpu) do { } while (0)
50 #define rcu_init_sched() do { } while (0)
51 #define exit_rcu() do { } while (0)
53 static inline void __rcu_check_callbacks(int cpu, int user) { }
54 #define rcu_check_callbacks __rcu_check_callbacks
56 #define rcu_needs_cpu(cpu) (0)
57 #define rcu_batches_completed() (0)
58 #define rcu_batches_completed_bh() (0)
59 #define rcu_preempt_depth() (0)
61 extern void rcu_force_quiescent_state(void);
63 #define rcu_sched_force_quiescent_state rcu_force_quiescent_state
64 #define rcu_bh_force_quiescent_state rcu_force_quiescent_state
66 #define rcu_enter_nohz() do { } while (0)
67 #define rcu_exit_nohz() do { } while (0)
69 extern void rcu_note_context_switch(int cpu);
71 #define rcu_sched_qs rcu_note_context_switch
72 #define rcu_bh_qs rcu_note_context_switch
73 #define rcu_virt_note_context_switch rcu_note_context_switch
75 extern void rcu_note_might_resched(void);
77 extern void rcu_scheduler_starting(void);
78 extern int rcu_scheduler_active __read_mostly;
80 #endif /* __LINUX_JRCU_H */