1 /* SPDX-License-Identifier: GPL-2.0 */ 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _LINUX_SCHED_XACCT_H 2 #ifndef _LINUX_SCHED_XACCT_H 3 #define _LINUX_SCHED_XACCT_H 3 #define _LINUX_SCHED_XACCT_H 4 4 5 /* 5 /* 6 * Extended task accounting methods: 6 * Extended task accounting methods: 7 */ 7 */ 8 8 9 #include <linux/sched.h> 9 #include <linux/sched.h> 10 10 11 #ifdef CONFIG_TASK_XACCT 11 #ifdef CONFIG_TASK_XACCT 12 static inline void add_rchar(struct task_struc 12 static inline void add_rchar(struct task_struct *tsk, ssize_t amt) 13 { 13 { 14 tsk->ioac.rchar += amt; 14 tsk->ioac.rchar += amt; 15 } 15 } 16 16 17 static inline void add_wchar(struct task_struc 17 static inline void add_wchar(struct task_struct *tsk, ssize_t amt) 18 { 18 { 19 tsk->ioac.wchar += amt; 19 tsk->ioac.wchar += amt; 20 } 20 } 21 21 22 static inline void inc_syscr(struct task_struc 22 static inline void inc_syscr(struct task_struct *tsk) 23 { 23 { 24 tsk->ioac.syscr++; 24 tsk->ioac.syscr++; 25 } 25 } 26 26 27 static inline void inc_syscw(struct task_struc 27 static inline void inc_syscw(struct task_struct *tsk) 28 { 28 { 29 tsk->ioac.syscw++; 29 tsk->ioac.syscw++; 30 } 30 } 31 #else 31 #else 32 static inline void add_rchar(struct task_struc 32 static inline void add_rchar(struct task_struct *tsk, ssize_t amt) 33 { 33 { 34 } 34 } 35 35 36 static inline void add_wchar(struct task_struc 36 static inline void add_wchar(struct task_struct *tsk, ssize_t amt) 37 { 37 { 38 } 38 } 39 39 40 static inline void inc_syscr(struct task_struc 40 static inline void inc_syscr(struct task_struct *tsk) 41 { 41 { 42 } 42 } 43 43 44 static inline void inc_syscw(struct task_struc 44 static inline void inc_syscw(struct task_struct *tsk) 45 { 45 { 46 } 46 } 47 #endif 47 #endif 48 48 49 #endif /* _LINUX_SCHED_XACCT_H */ 49 #endif /* _LINUX_SCHED_XACCT_H */ 50 50
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.