diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kernel.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 7d7519628dfa..8f28d35867f8 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -180,6 +180,13 @@ asmlinkage int printk(const char * fmt, ...) | |||
180 | extern int log_buf_get_len(void); | 180 | extern int log_buf_get_len(void); |
181 | extern int log_buf_read(int idx); | 181 | extern int log_buf_read(int idx); |
182 | extern int log_buf_copy(char *dest, int idx, int len); | 182 | extern int log_buf_copy(char *dest, int idx, int len); |
183 | |||
184 | extern int printk_ratelimit_jiffies; | ||
185 | extern int printk_ratelimit_burst; | ||
186 | extern int printk_ratelimit(void); | ||
187 | extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); | ||
188 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | ||
189 | unsigned int interval_msec); | ||
183 | #else | 190 | #else |
184 | static inline int vprintk(const char *s, va_list args) | 191 | static inline int vprintk(const char *s, va_list args) |
185 | __attribute__ ((format (printf, 1, 0))); | 192 | __attribute__ ((format (printf, 1, 0))); |
@@ -190,6 +197,12 @@ static inline int __cold printk(const char *s, ...) { return 0; } | |||
190 | static inline int log_buf_get_len(void) { return 0; } | 197 | static inline int log_buf_get_len(void) { return 0; } |
191 | static inline int log_buf_read(int idx) { return 0; } | 198 | static inline int log_buf_read(int idx) { return 0; } |
192 | static inline int log_buf_copy(char *dest, int idx, int len) { return 0; } | 199 | static inline int log_buf_copy(char *dest, int idx, int len) { return 0; } |
200 | static inline int printk_ratelimit(void) { return 0; } | ||
201 | static inline int __printk_ratelimit(int ratelimit_jiffies, \ | ||
202 | int ratelimit_burst) { return 0; } | ||
203 | static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ | ||
204 | unsigned int interval_msec) \ | ||
205 | { return false; } | ||
193 | #endif | 206 | #endif |
194 | 207 | ||
195 | extern void __attribute__((format(printf, 1, 2))) | 208 | extern void __attribute__((format(printf, 1, 2))) |
@@ -197,11 +210,6 @@ extern void __attribute__((format(printf, 1, 2))) | |||
197 | 210 | ||
198 | unsigned long int_sqrt(unsigned long); | 211 | unsigned long int_sqrt(unsigned long); |
199 | 212 | ||
200 | extern int printk_ratelimit(void); | ||
201 | extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); | ||
202 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | ||
203 | unsigned int interval_msec); | ||
204 | |||
205 | static inline void console_silent(void) | 213 | static inline void console_silent(void) |
206 | { | 214 | { |
207 | console_loglevel = 0; | 215 | console_loglevel = 0; |