2017-02-09 00:51:33 +07:00
|
|
|
#ifndef _LINUX_SCHED_XACCT_H
|
|
|
|
#define _LINUX_SCHED_XACCT_H
|
|
|
|
|
2017-02-03 01:10:05 +07:00
|
|
|
/*
|
|
|
|
* Extended task accounting methods:
|
|
|
|
*/
|
|
|
|
|
2017-02-09 00:51:33 +07:00
|
|
|
#include <linux/sched.h>
|
|
|
|
|
2017-02-03 01:10:05 +07:00
|
|
|
#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
|
|
|
|
|
2017-02-09 00:51:33 +07:00
|
|
|
#endif /* _LINUX_SCHED_XACCT_H */
|