]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blob - include/linux/sched/xacct.h
Merge branch 'regset' (PTRACE_SETREGSET data leakage)
[mirror_ubuntu-focal-kernel.git] / include / linux / sched / xacct.h
1 #ifndef _LINUX_SCHED_XACCT_H
2 #define _LINUX_SCHED_XACCT_H
3
4 /*
5 * Extended task accounting methods:
6 */
7
8 #include <linux/sched.h>
9
10 #ifdef CONFIG_TASK_XACCT
11 static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
12 {
13 tsk->ioac.rchar += amt;
14 }
15
16 static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
17 {
18 tsk->ioac.wchar += amt;
19 }
20
21 static inline void inc_syscr(struct task_struct *tsk)
22 {
23 tsk->ioac.syscr++;
24 }
25
26 static inline void inc_syscw(struct task_struct *tsk)
27 {
28 tsk->ioac.syscw++;
29 }
30 #else
31 static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
32 {
33 }
34
35 static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
36 {
37 }
38
39 static inline void inc_syscr(struct task_struct *tsk)
40 {
41 }
42
43 static inline void inc_syscw(struct task_struct *tsk)
44 {
45 }
46 #endif
47
48 #endif /* _LINUX_SCHED_XACCT_H */