blob: a28156a0d34a12b4e0a796b98f8353cabfec80f7 [file] [log] [blame]
Ingo Molnarb12fb7f2017-02-08 18:51:33 +01001#ifndef _LINUX_SCHED_XACCT_H
2#define _LINUX_SCHED_XACCT_H
3
Ingo Molnar9a070002017-02-02 19:10:05 +01004/*
5 * Extended task accounting methods:
6 */
7
Ingo Molnarb12fb7f2017-02-08 18:51:33 +01008#include <linux/sched.h>
9
Ingo Molnar9a070002017-02-02 19:10:05 +010010#ifdef CONFIG_TASK_XACCT
11static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
12{
13 tsk->ioac.rchar += amt;
14}
15
16static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
17{
18 tsk->ioac.wchar += amt;
19}
20
21static inline void inc_syscr(struct task_struct *tsk)
22{
23 tsk->ioac.syscr++;
24}
25
26static inline void inc_syscw(struct task_struct *tsk)
27{
28 tsk->ioac.syscw++;
29}
30#else
31static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
32{
33}
34
35static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
36{
37}
38
39static inline void inc_syscr(struct task_struct *tsk)
40{
41}
42
43static inline void inc_syscw(struct task_struct *tsk)
44{
45}
46#endif
47
Ingo Molnarb12fb7f2017-02-08 18:51:33 +010048#endif /* _LINUX_SCHED_XACCT_H */