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.h31
1 files changed, 27 insertions, 4 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index dede82c63445..446373535190 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -82,6 +82,7 @@ struct sched_param {
82#include <linux/resource.h> 82#include <linux/resource.h>
83#include <linux/timer.h> 83#include <linux/timer.h>
84#include <linux/hrtimer.h> 84#include <linux/hrtimer.h>
85#include <linux/task_io_accounting.h>
85 86
86#include <asm/processor.h> 87#include <asm/processor.h>
87 88
@@ -436,7 +437,12 @@ struct signal_struct {
436 /* job control IDs */ 437 /* job control IDs */
437 pid_t pgrp; 438 pid_t pgrp;
438 pid_t tty_old_pgrp; 439 pid_t tty_old_pgrp;
439 pid_t session; 440
441 union {
442 pid_t session __deprecated;
443 pid_t __session;
444 };
445
440 /* boolean value for session group leader */ 446 /* boolean value for session group leader */
441 int leader; 447 int leader;
442 448
@@ -642,6 +648,7 @@ enum idle_type
642#define SD_SHARE_CPUPOWER 128 /* Domain members share cpu power */ 648#define SD_SHARE_CPUPOWER 128 /* Domain members share cpu power */
643#define SD_POWERSAVINGS_BALANCE 256 /* Balance for power savings */ 649#define SD_POWERSAVINGS_BALANCE 256 /* Balance for power savings */
644#define SD_SHARE_PKG_RESOURCES 512 /* Domain members share cpu pkg resources */ 650#define SD_SHARE_PKG_RESOURCES 512 /* Domain members share cpu pkg resources */
651#define SD_SERIALIZE 1024 /* Only a single load balancing instance */
645 652
646#define BALANCE_FOR_MC_POWER \ 653#define BALANCE_FOR_MC_POWER \
647 (sched_smt_power_savings ? SD_POWERSAVINGS_BALANCE : 0) 654 (sched_smt_power_savings ? SD_POWERSAVINGS_BALANCE : 0)
@@ -1008,6 +1015,7 @@ struct task_struct {
1008 wait_queue_t *io_wait; 1015 wait_queue_t *io_wait;
1009/* i/o counters(bytes read/written, #syscalls */ 1016/* i/o counters(bytes read/written, #syscalls */
1010 u64 rchar, wchar, syscr, syscw; 1017 u64 rchar, wchar, syscr, syscw;
1018 struct task_io_accounting ioac;
1011#if defined(CONFIG_TASK_XACCT) 1019#if defined(CONFIG_TASK_XACCT)
1012 u64 acct_rss_mem1; /* accumulated rss usage */ 1020 u64 acct_rss_mem1; /* accumulated rss usage */
1013 u64 acct_vm_mem1; /* accumulated virtual memory usage */ 1021 u64 acct_vm_mem1; /* accumulated virtual memory usage */
@@ -1040,6 +1048,9 @@ struct task_struct {
1040#ifdef CONFIG_TASK_DELAY_ACCT 1048#ifdef CONFIG_TASK_DELAY_ACCT
1041 struct task_delay_info *delays; 1049 struct task_delay_info *delays;
1042#endif 1050#endif
1051#ifdef CONFIG_FAULT_INJECTION
1052 int make_it_fail;
1053#endif
1043}; 1054};
1044 1055
1045static inline pid_t process_group(struct task_struct *tsk) 1056static inline pid_t process_group(struct task_struct *tsk)
@@ -1047,6 +1058,21 @@ static inline pid_t process_group(struct task_struct *tsk)
1047 return tsk->signal->pgrp; 1058 return tsk->signal->pgrp;
1048} 1059}
1049 1060
1061static inline pid_t signal_session(struct signal_struct *sig)
1062{
1063 return sig->__session;
1064}
1065
1066static inline pid_t process_session(struct task_struct *tsk)
1067{
1068 return signal_session(tsk->signal);
1069}
1070
1071static inline void set_signal_session(struct signal_struct *sig, pid_t session)
1072{
1073 sig->__session = session;
1074}
1075
1050static inline struct pid *task_pid(struct task_struct *task) 1076static inline struct pid *task_pid(struct task_struct *task)
1051{ 1077{
1052 return task->pids[PIDTYPE_PID].pid; 1078 return task->pids[PIDTYPE_PID].pid;
@@ -1118,7 +1144,6 @@ static inline void put_task_struct(struct task_struct *t)
1118#define PF_MEMALLOC 0x00000800 /* Allocating memory */ 1144#define PF_MEMALLOC 0x00000800 /* Allocating memory */
1119#define PF_FLUSHER 0x00001000 /* responsible for disk writeback */ 1145#define PF_FLUSHER 0x00001000 /* responsible for disk writeback */
1120#define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ 1146#define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */
1121#define PF_FREEZE 0x00004000 /* this task is being frozen for suspend now */
1122#define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ 1147#define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */
1123#define PF_FROZEN 0x00010000 /* frozen for system suspend */ 1148#define PF_FROZEN 0x00010000 /* frozen for system suspend */
1124#define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ 1149#define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */
@@ -1240,7 +1265,6 @@ extern struct mm_struct init_mm;
1240 1265
1241#define find_task_by_pid(nr) find_task_by_pid_type(PIDTYPE_PID, nr) 1266#define find_task_by_pid(nr) find_task_by_pid_type(PIDTYPE_PID, nr)
1242extern struct task_struct *find_task_by_pid_type(int type, int pid); 1267extern struct task_struct *find_task_by_pid_type(int type, int pid);
1243extern void set_special_pids(pid_t session, pid_t pgrp);
1244extern void __set_special_pids(pid_t session, pid_t pgrp); 1268extern void __set_special_pids(pid_t session, pid_t pgrp);
1245 1269
1246/* per-UID process charging. */ 1270/* per-UID process charging. */
@@ -1381,7 +1405,6 @@ extern NORET_TYPE void do_group_exit(int);
1381extern void daemonize(const char *, ...); 1405extern void daemonize(const char *, ...);
1382extern int allow_signal(int); 1406extern int allow_signal(int);
1383extern int disallow_signal(int); 1407extern int disallow_signal(int);
1384extern struct task_struct *child_reaper;
1385 1408
1386extern int do_execve(char *, char __user * __user *, char __user * __user *, struct pt_regs *); 1409extern int do_execve(char *, char __user * __user *, char __user * __user *, struct pt_regs *);
1387extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *); 1410extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *);