repo: https://github.com/T-head-Semi/linux commit: b1313fe517ca3703119dcc99ef3bbf75ab42bcfb Change-Id: I6cbb35294024ea3a66140e311f4bb705fd7fd626
50 lines
854 B
C
50 lines
854 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_SCHED_XACCT_H
|
|
#define _LINUX_SCHED_XACCT_H
|
|
|
|
/*
|
|
* Extended task accounting methods:
|
|
*/
|
|
|
|
#include <linux/sched.h>
|
|
|
|
#ifdef CONFIG_TASK_XACCT
|
|
static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
|
|
{
|
|
tsk->ioac.rchar += amt;
|
|
}
|
|
|
|
static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
|
|
{
|
|
tsk->ioac.wchar += amt;
|
|
}
|
|
|
|
static inline void inc_syscr(struct task_struct *tsk)
|
|
{
|
|
tsk->ioac.syscr++;
|
|
}
|
|
|
|
static inline void inc_syscw(struct task_struct *tsk)
|
|
{
|
|
tsk->ioac.syscw++;
|
|
}
|
|
#else
|
|
static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
|
|
{
|
|
}
|
|
|
|
static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
|
|
{
|
|
}
|
|
|
|
static inline void inc_syscr(struct task_struct *tsk)
|
|
{
|
|
}
|
|
|
|
static inline void inc_syscw(struct task_struct *tsk)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#endif /* _LINUX_SCHED_XACCT_H */
|