aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/kernel.h18
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, ...)
180extern int log_buf_get_len(void); 180extern int log_buf_get_len(void);
181extern int log_buf_read(int idx); 181extern int log_buf_read(int idx);
182extern int log_buf_copy(char *dest, int idx, int len); 182extern int log_buf_copy(char *dest, int idx, int len);
183
184extern int printk_ratelimit_jiffies;
185extern int printk_ratelimit_burst;
186extern int printk_ratelimit(void);
187extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst);
188extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
189 unsigned int interval_msec);
183#else 190#else
184static inline int vprintk(const char *s, va_list args) 191static 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; }
190static inline int log_buf_get_len(void) { return 0; } 197static inline int log_buf_get_len(void) { return 0; }
191static inline int log_buf_read(int idx) { return 0; } 198static inline int log_buf_read(int idx) { return 0; }
192static inline int log_buf_copy(char *dest, int idx, int len) { return 0; } 199static inline int log_buf_copy(char *dest, int idx, int len) { return 0; }
200static inline int printk_ratelimit(void) { return 0; }
201static inline int __printk_ratelimit(int ratelimit_jiffies, \
202 int ratelimit_burst) { return 0; }
203static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \
204 unsigned int interval_msec) \
205 { return false; }
193#endif 206#endif
194 207
195extern void __attribute__((format(printf, 1, 2))) 208extern void __attribute__((format(printf, 1, 2)))
@@ -197,11 +210,6 @@ extern void __attribute__((format(printf, 1, 2)))
197 210
198unsigned long int_sqrt(unsigned long); 211unsigned long int_sqrt(unsigned long);
199 212
200extern int printk_ratelimit(void);
201extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst);
202extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
203 unsigned int interval_msec);
204
205static inline void console_silent(void) 213static inline void console_silent(void)
206{ 214{
207 console_loglevel = 0; 215 console_loglevel = 0;