Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
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
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
48#endif /* _LINUX_SCHED_XACCT_H */