diff options
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 80f39cab470a..b9b5e4ba166a 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -30,8 +30,10 @@ extern const char linux_banner[]; | |||
30 | 30 | ||
31 | #define STACK_MAGIC 0xdeadbeef | 31 | #define STACK_MAGIC 0xdeadbeef |
32 | 32 | ||
33 | #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) | ||
34 | #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) | ||
35 | |||
33 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | 36 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
34 | #define ALIGN(x,a) (((x)+(a)-1UL)&~((a)-1UL)) | ||
35 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | 37 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) |
36 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) | 38 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
37 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) | 39 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) |
@@ -171,6 +173,8 @@ __attribute_const__ roundup_pow_of_two(unsigned long x) | |||
171 | 173 | ||
172 | extern int printk_ratelimit(void); | 174 | extern int printk_ratelimit(void); |
173 | extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); | 175 | extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); |
176 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | ||
177 | unsigned int interval_msec); | ||
174 | 178 | ||
175 | static inline void console_silent(void) | 179 | static inline void console_silent(void) |
176 | { | 180 | { |