ddk: v4.5.7
git-svn-id: svn://kolibrios.org@6936 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -48,10 +48,17 @@
|
||||
|
||||
#include <asm/barrier.h>
|
||||
|
||||
#ifndef CONFIG_TINY_RCU
|
||||
extern int rcu_expedited; /* for sysctl */
|
||||
extern int rcu_normal; /* also for sysctl */
|
||||
#endif /* #ifndef CONFIG_TINY_RCU */
|
||||
|
||||
#ifdef CONFIG_TINY_RCU
|
||||
/* Tiny RCU doesn't expedite, as its purpose in life is instead to be tiny. */
|
||||
static inline bool rcu_gp_is_normal(void) /* Internal RCU use. */
|
||||
{
|
||||
return true;
|
||||
}
|
||||
static inline bool rcu_gp_is_expedited(void) /* Internal RCU use. */
|
||||
{
|
||||
return false;
|
||||
@@ -65,6 +72,7 @@ static inline void rcu_unexpedite_gp(void)
|
||||
{
|
||||
}
|
||||
#else /* #ifdef CONFIG_TINY_RCU */
|
||||
bool rcu_gp_is_normal(void); /* Internal RCU use. */
|
||||
bool rcu_gp_is_expedited(void); /* Internal RCU use. */
|
||||
void rcu_expedite_gp(void);
|
||||
void rcu_unexpedite_gp(void);
|
||||
@@ -283,7 +291,6 @@ static inline int rcu_preempt_depth(void)
|
||||
|
||||
/* Internal to kernel */
|
||||
void rcu_init(void);
|
||||
void rcu_end_inkernel_boot(void);
|
||||
void rcu_sched_qs(void);
|
||||
void rcu_bh_qs(void);
|
||||
void rcu_check_callbacks(int user);
|
||||
@@ -291,6 +298,12 @@ struct notifier_block;
|
||||
int rcu_cpu_notify(struct notifier_block *self,
|
||||
unsigned long action, void *hcpu);
|
||||
|
||||
#ifndef CONFIG_TINY_RCU
|
||||
void rcu_end_inkernel_boot(void);
|
||||
#else /* #ifndef CONFIG_TINY_RCU */
|
||||
static inline void rcu_end_inkernel_boot(void) { }
|
||||
#endif /* #ifndef CONFIG_TINY_RCU */
|
||||
|
||||
#ifdef CONFIG_RCU_STALL_COMMON
|
||||
void rcu_sysrq_start(void);
|
||||
void rcu_sysrq_end(void);
|
||||
@@ -341,9 +354,9 @@ static inline void rcu_init_nohz(void)
|
||||
*/
|
||||
#define RCU_NONIDLE(a) \
|
||||
do { \
|
||||
rcu_irq_enter(); \
|
||||
rcu_irq_enter_irqson(); \
|
||||
do { a; } while (0); \
|
||||
rcu_irq_exit(); \
|
||||
rcu_irq_exit_irqson(); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
@@ -703,7 +716,7 @@ static inline void rcu_preempt_sleep_check(void)
|
||||
* The tracing infrastructure traces RCU (we want that), but unfortunately
|
||||
* some of the RCU checks causes tracing to lock up the system.
|
||||
*
|
||||
* The tracing version of rcu_dereference_raw() must not call
|
||||
* The no-tracing version of rcu_dereference_raw() must not call
|
||||
* rcu_read_lock_held().
|
||||
*/
|
||||
#define rcu_dereference_raw_notrace(p) __rcu_dereference_check((p), 1, __rcu)
|
||||
@@ -753,6 +766,28 @@ static inline void rcu_preempt_sleep_check(void)
|
||||
*/
|
||||
#define rcu_dereference_sched(p) rcu_dereference_sched_check(p, 0)
|
||||
|
||||
/**
|
||||
* rcu_pointer_handoff() - Hand off a pointer from RCU to other mechanism
|
||||
* @p: The pointer to hand off
|
||||
*
|
||||
* This is simply an identity function, but it documents where a pointer
|
||||
* is handed off from RCU to some other synchronization mechanism, for
|
||||
* example, reference counting or locking. In C11, it would map to
|
||||
* kill_dependency(). It could be used as follows:
|
||||
*
|
||||
* rcu_read_lock();
|
||||
* p = rcu_dereference(gp);
|
||||
* long_lived = is_long_lived(p);
|
||||
* if (long_lived) {
|
||||
* if (!atomic_inc_not_zero(p->refcnt))
|
||||
* long_lived = false;
|
||||
* else
|
||||
* p = rcu_pointer_handoff(p);
|
||||
* }
|
||||
* rcu_read_unlock();
|
||||
*/
|
||||
#define rcu_pointer_handoff(p) (p)
|
||||
|
||||
/**
|
||||
* rcu_read_lock() - mark the beginning of an RCU read-side critical section
|
||||
*
|
||||
@@ -985,7 +1020,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
|
||||
#define RCU_INIT_POINTER(p, v) \
|
||||
do { \
|
||||
rcu_dereference_sparse(p, __rcu); \
|
||||
p = RCU_INITIALIZER(v); \
|
||||
WRITE_ONCE(p, RCU_INITIALIZER(v)); \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user