diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-14 15:18:01 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-14 15:18:01 -0500 |
commit | f33b5d783b4f56be5ace6a1c98fb5f76b2d2d07d (patch) | |
tree | b027b5f3429d416b3da5b9195024007dab062a5e /include/linux/percpu_counter.h | |
parent | e935d5da8e5d12fabe5b632736c50eae0427e8c8 (diff) | |
parent | 67963132638e67ad3c5aa16765e6f3f2f3cdd85c (diff) |
Merge ../linux-2.6
Diffstat (limited to 'include/linux/percpu_counter.h')
-rw-r--r-- | include/linux/percpu_counter.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h index bd6708e2c027..682525511c9e 100644 --- a/include/linux/percpu_counter.h +++ b/include/linux/percpu_counter.h | |||
@@ -39,6 +39,7 @@ static inline void percpu_counter_destroy(struct percpu_counter *fbc) | |||
39 | } | 39 | } |
40 | 40 | ||
41 | void percpu_counter_mod(struct percpu_counter *fbc, long amount); | 41 | void percpu_counter_mod(struct percpu_counter *fbc, long amount); |
42 | long percpu_counter_sum(struct percpu_counter *fbc); | ||
42 | 43 | ||
43 | static inline long percpu_counter_read(struct percpu_counter *fbc) | 44 | static inline long percpu_counter_read(struct percpu_counter *fbc) |
44 | { | 45 | { |
@@ -92,6 +93,11 @@ static inline long percpu_counter_read_positive(struct percpu_counter *fbc) | |||
92 | return fbc->count; | 93 | return fbc->count; |
93 | } | 94 | } |
94 | 95 | ||
96 | static inline long percpu_counter_sum(struct percpu_counter *fbc) | ||
97 | { | ||
98 | return percpu_counter_read_positive(fbc); | ||
99 | } | ||
100 | |||
95 | #endif /* CONFIG_SMP */ | 101 | #endif /* CONFIG_SMP */ |
96 | 102 | ||
97 | static inline void percpu_counter_inc(struct percpu_counter *fbc) | 103 | static inline void percpu_counter_inc(struct percpu_counter *fbc) |