diff options
author | Andrew Morton <akpm@osdl.org> | 2006-03-25 06:08:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 11:22:59 -0500 |
commit | 3d18bd74a22d0bed3bc81fc64c4ba6344a10f155 (patch) | |
tree | 414b44796651db833481e17030f0b18a1be3527b /include/linux/cpumask.h | |
parent | ccb46000f4bb459777686611157ac0eac928704e (diff) |
[PATCH] cpumask: uninline next_cpu()
text data bss dec hex filename
before: 3488027 1322496 360128 5170651 4ee5db vmlinux
after: 3485112 1322480 359968 5167560 4ed9c8 vmlinux
2931 bytes saved
Cc: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/cpumask.h')
-rw-r--r-- | include/linux/cpumask.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 9b702fd24a72..4b29e508a0b6 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -215,16 +215,13 @@ static inline void __cpus_shift_left(cpumask_t *dstp, | |||
215 | #ifdef CONFIG_SMP | 215 | #ifdef CONFIG_SMP |
216 | int __first_cpu(const cpumask_t *srcp); | 216 | int __first_cpu(const cpumask_t *srcp); |
217 | #define first_cpu(src) __first_cpu(&(src)) | 217 | #define first_cpu(src) __first_cpu(&(src)) |
218 | int __next_cpu(int n, const cpumask_t *srcp); | ||
219 | #define next_cpu(n, src) __next_cpu((n), &(src)) | ||
218 | #else | 220 | #else |
219 | #define first_cpu(src) 0 | 221 | #define first_cpu(src) 0 |
222 | #define next_cpu(n, src) 1 | ||
220 | #endif | 223 | #endif |
221 | 224 | ||
222 | #define next_cpu(n, src) __next_cpu((n), &(src), NR_CPUS) | ||
223 | static inline int __next_cpu(int n, const cpumask_t *srcp, int nbits) | ||
224 | { | ||
225 | return min_t(int, nbits, find_next_bit(srcp->bits, nbits, n+1)); | ||
226 | } | ||
227 | |||
228 | #define cpumask_of_cpu(cpu) \ | 225 | #define cpumask_of_cpu(cpu) \ |
229 | ({ \ | 226 | ({ \ |
230 | typeof(_unused_cpumask_arg_) m; \ | 227 | typeof(_unused_cpumask_arg_) m; \ |