aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 40728cf1c452..5449d2f4a1ef 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -162,6 +162,7 @@ extern int _cond_resched(void);
162#endif 162#endif
163 163
164#ifdef CONFIG_DEBUG_ATOMIC_SLEEP 164#ifdef CONFIG_DEBUG_ATOMIC_SLEEP
165 void ___might_sleep(const char *file, int line, int preempt_offset);
165 void __might_sleep(const char *file, int line, int preempt_offset); 166 void __might_sleep(const char *file, int line, int preempt_offset);
166/** 167/**
167 * might_sleep - annotation for functions that can sleep 168 * might_sleep - annotation for functions that can sleep
@@ -175,10 +176,14 @@ extern int _cond_resched(void);
175 */ 176 */
176# define might_sleep() \ 177# define might_sleep() \
177 do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0) 178 do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0)
179# define sched_annotate_sleep() __set_current_state(TASK_RUNNING)
178#else 180#else
181 static inline void ___might_sleep(const char *file, int line,
182 int preempt_offset) { }
179 static inline void __might_sleep(const char *file, int line, 183 static inline void __might_sleep(const char *file, int line,
180 int preempt_offset) { } 184 int preempt_offset) { }
181# define might_sleep() do { might_resched(); } while (0) 185# define might_sleep() do { might_resched(); } while (0)
186# define sched_annotate_sleep() do { } while (0)
182#endif 187#endif
183 188
184#define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0) 189#define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
@@ -403,6 +408,7 @@ int vsscanf(const char *, const char *, va_list);
403extern int get_option(char **str, int *pint); 408extern int get_option(char **str, int *pint);
404extern char *get_options(const char *str, int nints, int *ints); 409extern char *get_options(const char *str, int nints, int *ints);
405extern unsigned long long memparse(const char *ptr, char **retptr); 410extern unsigned long long memparse(const char *ptr, char **retptr);
411extern bool parse_option_str(const char *str, const char *option);
406 412
407extern int core_kernel_text(unsigned long addr); 413extern int core_kernel_text(unsigned long addr);
408extern int core_kernel_data(unsigned long addr); 414extern int core_kernel_data(unsigned long addr);
@@ -410,9 +416,6 @@ extern int __kernel_text_address(unsigned long addr);
410extern int kernel_text_address(unsigned long addr); 416extern int kernel_text_address(unsigned long addr);
411extern int func_ptr_is_kernel_text(void *ptr); 417extern int func_ptr_is_kernel_text(void *ptr);
412 418
413struct pid;
414extern struct pid *session_of_pgrp(struct pid *pgrp);
415
416unsigned long int_sqrt(unsigned long); 419unsigned long int_sqrt(unsigned long);
417 420
418extern void bust_spinlocks(int yes); 421extern void bust_spinlocks(int yes);
@@ -421,6 +424,7 @@ extern int panic_timeout;
421extern int panic_on_oops; 424extern int panic_on_oops;
422extern int panic_on_unrecovered_nmi; 425extern int panic_on_unrecovered_nmi;
423extern int panic_on_io_nmi; 426extern int panic_on_io_nmi;
427extern int panic_on_warn;
424extern int sysctl_panic_on_stackoverflow; 428extern int sysctl_panic_on_stackoverflow;
425/* 429/*
426 * Only to be used by arch init code. If the user over-wrote the default 430 * Only to be used by arch init code. If the user over-wrote the default