Merge tag 'xtensa-20180225' of git://github.com/jcmvbkbc/linux-xtensa
[cris-mirror.git] / include / linux / sched / xacct.h
blobc078f0a94ceca7ddae6630fc6640f3553d5d8a42
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_SCHED_XACCT_H
3 #define _LINUX_SCHED_XACCT_H
5 /*
6 * Extended task accounting methods:
7 */
9 #include <linux/sched.h>
11 #ifdef CONFIG_TASK_XACCT
12 static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
14 tsk->ioac.rchar += amt;
17 static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
19 tsk->ioac.wchar += amt;
22 static inline void inc_syscr(struct task_struct *tsk)
24 tsk->ioac.syscr++;
27 static inline void inc_syscw(struct task_struct *tsk)
29 tsk->ioac.syscw++;
31 #else
32 static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
36 static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
40 static inline void inc_syscr(struct task_struct *tsk)
44 static inline void inc_syscw(struct task_struct *tsk)
47 #endif
49 #endif /* _LINUX_SCHED_XACCT_H */