mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
rcu: Renamings to increase RCU clarity
Make RCU-sched, RCU-bh, and RCU-preempt be underlying implementations, with "RCU" defined in terms of one of the three. Update the outdated rcu_qsctr_inc() names, as these functions no longer increment anything. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: laijs@cn.fujitsu.com Cc: dipankar@in.ibm.com Cc: akpm@linux-foundation.org Cc: mathieu.desnoyers@polymtl.ca Cc: josht@linux.vnet.ibm.com Cc: dvhltc@us.ibm.com Cc: niv@us.ibm.com Cc: peterz@infradead.org Cc: rostedt@goodmis.org LKML-Reference: <12509746132696-git-send-email-> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
9f77da9f40
commit
d6714c22b4
10 changed files with 95 additions and 63 deletions
|
|
@ -157,17 +157,28 @@ extern int rcu_scheduler_active;
|
|||
* - call_rcu_sched() and rcu_barrier_sched()
|
||||
* on the write-side to insure proper synchronization.
|
||||
*/
|
||||
#define rcu_read_lock_sched() preempt_disable()
|
||||
#define rcu_read_lock_sched_notrace() preempt_disable_notrace()
|
||||
static inline void rcu_read_lock_sched(void)
|
||||
{
|
||||
preempt_disable();
|
||||
}
|
||||
static inline void rcu_read_lock_sched_notrace(void)
|
||||
{
|
||||
preempt_disable_notrace();
|
||||
}
|
||||
|
||||
/*
|
||||
* rcu_read_unlock_sched - marks the end of a RCU-classic critical section
|
||||
*
|
||||
* See rcu_read_lock_sched for more information.
|
||||
*/
|
||||
#define rcu_read_unlock_sched() preempt_enable()
|
||||
#define rcu_read_unlock_sched_notrace() preempt_enable_notrace()
|
||||
|
||||
static inline void rcu_read_unlock_sched(void)
|
||||
{
|
||||
preempt_enable();
|
||||
}
|
||||
static inline void rcu_read_unlock_sched_notrace(void)
|
||||
{
|
||||
preempt_enable_notrace();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@
|
|||
#include <linux/cpumask.h>
|
||||
#include <linux/seqlock.h>
|
||||
|
||||
extern void rcu_qsctr_inc(int cpu);
|
||||
static inline void rcu_bh_qsctr_inc(int cpu) { }
|
||||
extern void rcu_sched_qs(int cpu);
|
||||
static inline void rcu_bh_qs(int cpu) { }
|
||||
|
||||
/*
|
||||
* Someone might want to pass call_rcu_bh as a function pointer.
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@
|
|||
#ifndef __LINUX_RCUTREE_H
|
||||
#define __LINUX_RCUTREE_H
|
||||
|
||||
extern void rcu_qsctr_inc(int cpu);
|
||||
extern void rcu_bh_qsctr_inc(int cpu);
|
||||
extern void rcu_sched_qs(int cpu);
|
||||
extern void rcu_bh_qs(int cpu);
|
||||
|
||||
extern int rcu_pending(int cpu);
|
||||
extern int rcu_needs_cpu(int cpu);
|
||||
|
|
@ -73,7 +73,8 @@ static inline void __rcu_read_unlock_bh(void)
|
|||
|
||||
#define __synchronize_sched() synchronize_rcu()
|
||||
|
||||
#define call_rcu_sched(head, func) call_rcu(head, func)
|
||||
extern void call_rcu_sched(struct rcu_head *head,
|
||||
void (*func)(struct rcu_head *rcu));
|
||||
|
||||
static inline void synchronize_rcu_expedited(void)
|
||||
{
|
||||
|
|
@ -91,6 +92,7 @@ extern void rcu_restart_cpu(int cpu);
|
|||
|
||||
extern long rcu_batches_completed(void);
|
||||
extern long rcu_batches_completed_bh(void);
|
||||
extern long rcu_batches_completed_sched(void);
|
||||
|
||||
static inline void rcu_init_sched(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue