diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 45 |
1 files changed, 41 insertions, 4 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 446373535190..5053dc01fad4 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -436,7 +436,7 @@ struct signal_struct { | |||
436 | 436 | ||
437 | /* job control IDs */ | 437 | /* job control IDs */ |
438 | pid_t pgrp; | 438 | pid_t pgrp; |
439 | pid_t tty_old_pgrp; | 439 | struct pid *tty_old_pgrp; |
440 | 440 | ||
441 | union { | 441 | union { |
442 | pid_t session __deprecated; | 442 | pid_t session __deprecated; |
@@ -1013,8 +1013,10 @@ struct task_struct { | |||
1013 | * to a stack based synchronous wait) if its doing sync IO. | 1013 | * to a stack based synchronous wait) if its doing sync IO. |
1014 | */ | 1014 | */ |
1015 | wait_queue_t *io_wait; | 1015 | wait_queue_t *io_wait; |
1016 | #ifdef CONFIG_TASK_XACCT | ||
1016 | /* i/o counters(bytes read/written, #syscalls */ | 1017 | /* i/o counters(bytes read/written, #syscalls */ |
1017 | u64 rchar, wchar, syscr, syscw; | 1018 | u64 rchar, wchar, syscr, syscw; |
1019 | #endif | ||
1018 | struct task_io_accounting ioac; | 1020 | struct task_io_accounting ioac; |
1019 | #if defined(CONFIG_TASK_XACCT) | 1021 | #if defined(CONFIG_TASK_XACCT) |
1020 | u64 acct_rss_mem1; /* accumulated rss usage */ | 1022 | u64 acct_rss_mem1; /* accumulated rss usage */ |
@@ -1327,14 +1329,11 @@ extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); | |||
1327 | extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); | 1329 | extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); |
1328 | extern int kill_pgrp(struct pid *pid, int sig, int priv); | 1330 | extern int kill_pgrp(struct pid *pid, int sig, int priv); |
1329 | extern int kill_pid(struct pid *pid, int sig, int priv); | 1331 | extern int kill_pid(struct pid *pid, int sig, int priv); |
1330 | extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); | ||
1331 | extern int kill_pg_info(int, struct siginfo *, pid_t); | ||
1332 | extern void do_notify_parent(struct task_struct *, int); | 1332 | extern void do_notify_parent(struct task_struct *, int); |
1333 | extern void force_sig(int, struct task_struct *); | 1333 | extern void force_sig(int, struct task_struct *); |
1334 | extern void force_sig_specific(int, struct task_struct *); | 1334 | extern void force_sig_specific(int, struct task_struct *); |
1335 | extern int send_sig(int, struct task_struct *, int); | 1335 | extern int send_sig(int, struct task_struct *, int); |
1336 | extern void zap_other_threads(struct task_struct *p); | 1336 | extern void zap_other_threads(struct task_struct *p); |
1337 | extern int kill_pg(pid_t, int, int); | ||
1338 | extern int kill_proc(pid_t, int, int); | 1337 | extern int kill_proc(pid_t, int, int); |
1339 | extern struct sigqueue *sigqueue_alloc(void); | 1338 | extern struct sigqueue *sigqueue_alloc(void); |
1340 | extern void sigqueue_free(struct sigqueue *); | 1339 | extern void sigqueue_free(struct sigqueue *); |
@@ -1649,6 +1648,44 @@ extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); | |||
1649 | 1648 | ||
1650 | extern void normalize_rt_tasks(void); | 1649 | extern void normalize_rt_tasks(void); |
1651 | 1650 | ||
1651 | #ifdef CONFIG_TASK_XACCT | ||
1652 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | ||
1653 | { | ||
1654 | tsk->rchar += amt; | ||
1655 | } | ||
1656 | |||
1657 | static inline void add_wchar(struct task_struct *tsk, ssize_t amt) | ||
1658 | { | ||
1659 | tsk->wchar += amt; | ||
1660 | } | ||
1661 | |||
1662 | static inline void inc_syscr(struct task_struct *tsk) | ||
1663 | { | ||
1664 | tsk->syscr++; | ||
1665 | } | ||
1666 | |||
1667 | static inline void inc_syscw(struct task_struct *tsk) | ||
1668 | { | ||
1669 | tsk->syscw++; | ||
1670 | } | ||
1671 | #else | ||
1672 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | ||
1673 | { | ||
1674 | } | ||
1675 | |||
1676 | static inline void add_wchar(struct task_struct *tsk, ssize_t amt) | ||
1677 | { | ||
1678 | } | ||
1679 | |||
1680 | static inline void inc_syscr(struct task_struct *tsk) | ||
1681 | { | ||
1682 | } | ||
1683 | |||
1684 | static inline void inc_syscw(struct task_struct *tsk) | ||
1685 | { | ||
1686 | } | ||
1687 | #endif | ||
1688 | |||
1652 | #endif /* __KERNEL__ */ | 1689 | #endif /* __KERNEL__ */ |
1653 | 1690 | ||
1654 | #endif | 1691 | #endif |