diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-06-01 00:03:55 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-09-29 00:36:38 -0400 |
commit | 990987511c200877bb20201772d5de46644151f2 (patch) | |
tree | a7f7bf9f2775a575a9a8c80a165706cea2f18afe | |
parent | b3fbab0571eb09746cc0283648165ec00efc8eb2 (diff) |
rcu: Move rcu_head definition to types.h
Take a first step towards untangling Linux kernel header files by
placing the struct rcu_head definition into include/linux/types.h
and including include/linux/types.h in include/linux/rcupdate.h
where struct rcu_head used to be defined. The actual inclusion point
for include/linux/types.h is with the rest of the #include directives
rather than at the point where struct rcu_head used to be defined,
as suggested by Mathieu Desnoyers.
Once this is in place, then header files that need only rcu_head
can include types.h rather than rcupdate.h.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-rw-r--r-- | include/linux/rcupdate.h | 11 | ||||
-rw-r--r-- | include/linux/types.h | 10 |
2 files changed, 11 insertions, 10 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 8e7470d8b676..87bd390df73f 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -33,6 +33,7 @@ | |||
33 | #ifndef __LINUX_RCUPDATE_H | 33 | #ifndef __LINUX_RCUPDATE_H |
34 | #define __LINUX_RCUPDATE_H | 34 | #define __LINUX_RCUPDATE_H |
35 | 35 | ||
36 | #include <linux/types.h> | ||
36 | #include <linux/cache.h> | 37 | #include <linux/cache.h> |
37 | #include <linux/spinlock.h> | 38 | #include <linux/spinlock.h> |
38 | #include <linux/threads.h> | 39 | #include <linux/threads.h> |
@@ -64,16 +65,6 @@ static inline void rcutorture_record_progress(unsigned long vernum) | |||
64 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) | 65 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) |
65 | #define ULONG_CMP_LT(a, b) (ULONG_MAX / 2 < (a) - (b)) | 66 | #define ULONG_CMP_LT(a, b) (ULONG_MAX / 2 < (a) - (b)) |
66 | 67 | ||
67 | /** | ||
68 | * struct rcu_head - callback structure for use with RCU | ||
69 | * @next: next update requests in a list | ||
70 | * @func: actual update function to call after the grace period. | ||
71 | */ | ||
72 | struct rcu_head { | ||
73 | struct rcu_head *next; | ||
74 | void (*func)(struct rcu_head *head); | ||
75 | }; | ||
76 | |||
77 | /* Exported common interfaces */ | 68 | /* Exported common interfaces */ |
78 | extern void call_rcu_sched(struct rcu_head *head, | 69 | extern void call_rcu_sched(struct rcu_head *head, |
79 | void (*func)(struct rcu_head *rcu)); | 70 | void (*func)(struct rcu_head *rcu)); |
diff --git a/include/linux/types.h b/include/linux/types.h index 176da8c1fbb1..57a97234bec1 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -238,6 +238,16 @@ struct ustat { | |||
238 | char f_fpack[6]; | 238 | char f_fpack[6]; |
239 | }; | 239 | }; |
240 | 240 | ||
241 | /** | ||
242 | * struct rcu_head - callback structure for use with RCU | ||
243 | * @next: next update requests in a list | ||
244 | * @func: actual update function to call after the grace period. | ||
245 | */ | ||
246 | struct rcu_head { | ||
247 | struct rcu_head *next; | ||
248 | void (*func)(struct rcu_head *head); | ||
249 | }; | ||
250 | |||
241 | #endif /* __KERNEL__ */ | 251 | #endif /* __KERNEL__ */ |
242 | #endif /* __ASSEMBLY__ */ | 252 | #endif /* __ASSEMBLY__ */ |
243 | #endif /* _LINUX_TYPES_H */ | 253 | #endif /* _LINUX_TYPES_H */ |