aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index b94f3541f67b..b4c38bc8049c 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -205,7 +205,8 @@ extern unsigned long long time_sync_thresh;
205#define task_is_stopped_or_traced(task) \ 205#define task_is_stopped_or_traced(task) \
206 ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0) 206 ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0)
207#define task_contributes_to_load(task) \ 207#define task_contributes_to_load(task) \
208 ((task->state & TASK_UNINTERRUPTIBLE) != 0) 208 ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \
209 (task->flags & PF_FROZEN) == 0)
209 210
210#define __set_task_state(tsk, state_value) \ 211#define __set_task_state(tsk, state_value) \
211 do { (tsk)->state = (state_value); } while (0) 212 do { (tsk)->state = (state_value); } while (0)
@@ -300,17 +301,11 @@ extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write,
300 struct file *filp, void __user *buffer, 301 struct file *filp, void __user *buffer,
301 size_t *lenp, loff_t *ppos); 302 size_t *lenp, loff_t *ppos);
302extern unsigned int softlockup_panic; 303extern unsigned int softlockup_panic;
303extern unsigned long sysctl_hung_task_check_count;
304extern unsigned long sysctl_hung_task_timeout_secs;
305extern unsigned long sysctl_hung_task_warnings;
306extern int softlockup_thresh; 304extern int softlockup_thresh;
307#else 305#else
308static inline void softlockup_tick(void) 306static inline void softlockup_tick(void)
309{ 307{
310} 308}
311static inline void spawn_softlockup_task(void)
312{
313}
314static inline void touch_softlockup_watchdog(void) 309static inline void touch_softlockup_watchdog(void)
315{ 310{
316} 311}
@@ -319,6 +314,15 @@ static inline void touch_all_softlockup_watchdogs(void)
319} 314}
320#endif 315#endif
321 316
317#ifdef CONFIG_DETECT_HUNG_TASK
318extern unsigned int sysctl_hung_task_panic;
319extern unsigned long sysctl_hung_task_check_count;
320extern unsigned long sysctl_hung_task_timeout_secs;
321extern unsigned long sysctl_hung_task_warnings;
322extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
323 struct file *filp, void __user *buffer,
324 size_t *lenp, loff_t *ppos);
325#endif
322 326
323/* Attach to any functions which should be ignored in wchan output. */ 327/* Attach to any functions which should be ignored in wchan output. */
324#define __sched __attribute__((__section__(".sched.text"))) 328#define __sched __attribute__((__section__(".sched.text")))
@@ -1255,9 +1259,8 @@ struct task_struct {
1255/* ipc stuff */ 1259/* ipc stuff */
1256 struct sysv_sem sysvsem; 1260 struct sysv_sem sysvsem;
1257#endif 1261#endif
1258#ifdef CONFIG_DETECT_SOFTLOCKUP 1262#ifdef CONFIG_DETECT_HUNG_TASK
1259/* hung task detection */ 1263/* hung task detection */
1260 unsigned long last_switch_timestamp;
1261 unsigned long last_switch_count; 1264 unsigned long last_switch_count;
1262#endif 1265#endif
1263/* CPU-specific state of this task */ 1266/* CPU-specific state of this task */
@@ -1294,6 +1297,11 @@ struct task_struct {
1294/* Protection of (de-)allocation: mm, files, fs, tty, keyrings */ 1297/* Protection of (de-)allocation: mm, files, fs, tty, keyrings */
1295 spinlock_t alloc_lock; 1298 spinlock_t alloc_lock;
1296 1299
1300#ifdef CONFIG_GENERIC_HARDIRQS
1301 /* IRQ handler threads */
1302 struct irqaction *irqaction;
1303#endif
1304
1297 /* Protection of the PI data structures: */ 1305 /* Protection of the PI data structures: */
1298 spinlock_t pi_lock; 1306 spinlock_t pi_lock;
1299 1307