diff options
Diffstat (limited to 'include/linux/rcupdate.h')
-rw-r--r-- | include/linux/rcupdate.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index d7af96ef6fcf..325bad7bbca9 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -47,6 +47,9 @@ | |||
47 | extern int rcutorture_runnable; /* for sysctl */ | 47 | extern int rcutorture_runnable; /* for sysctl */ |
48 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | 48 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ |
49 | 49 | ||
50 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) | ||
51 | #define ULONG_CMP_LT(a, b) (ULONG_MAX / 2 < (a) - (b)) | ||
52 | |||
50 | /** | 53 | /** |
51 | * struct rcu_head - callback structure for use with RCU | 54 | * struct rcu_head - callback structure for use with RCU |
52 | * @next: next update requests in a list | 55 | * @next: next update requests in a list |
@@ -66,6 +69,18 @@ extern int sched_expedited_torture_stats(char *page); | |||
66 | /* Internal to kernel */ | 69 | /* Internal to kernel */ |
67 | extern void rcu_init(void); | 70 | extern void rcu_init(void); |
68 | 71 | ||
72 | #ifdef CONFIG_PREEMPT_RCU | ||
73 | |||
74 | /* | ||
75 | * Defined as a macro as it is a very low level header included from | ||
76 | * areas that don't even know about current. This gives the rcu_read_lock() | ||
77 | * nesting depth, but makes sense only if CONFIG_PREEMPT_RCU -- in other | ||
78 | * types of kernel builds, the rcu_read_lock() nesting depth is unknowable. | ||
79 | */ | ||
80 | #define rcu_preempt_depth() (current->rcu_read_lock_nesting) | ||
81 | |||
82 | #endif /* #ifdef CONFIG_PREEMPT_RCU */ | ||
83 | |||
69 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) | 84 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) |
70 | #include <linux/rcutree.h> | 85 | #include <linux/rcutree.h> |
71 | #elif defined(CONFIG_TINY_RCU) || defined(CONFIG_TINY_PREEMPT_RCU) | 86 | #elif defined(CONFIG_TINY_RCU) || defined(CONFIG_TINY_PREEMPT_RCU) |