diff options
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 3d770f5564b8..233ea8107038 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) |
@@ -422,6 +427,7 @@ extern int panic_timeout; | |||
422 | extern int panic_on_oops; | 427 | extern int panic_on_oops; |
423 | extern int panic_on_unrecovered_nmi; | 428 | extern int panic_on_unrecovered_nmi; |
424 | extern int panic_on_io_nmi; | 429 | extern int panic_on_io_nmi; |
430 | extern int panic_on_warn; | ||
425 | extern int sysctl_panic_on_stackoverflow; | 431 | extern int sysctl_panic_on_stackoverflow; |
426 | /* | 432 | /* |
427 | * Only to be used by arch init code. If the user over-wrote the default | 433 | * Only to be used by arch init code. If the user over-wrote the default |