blob: 3251965bf4cc704378939e7f0080f97625e2cfd3 [file] [log] [blame]
Jay Lanf3cef7a2006-09-30 23:28:55 -07001/*
2 * tsacct_kern.h - kernel header for system accounting over taskstats interface
3 *
4 * Copyright (C) Jay Lan SGI
5 */
6
7#ifndef _LINUX_TSACCT_KERN_H
8#define _LINUX_TSACCT_KERN_H
9
10#include <linux/taskstats.h>
11
12#ifdef CONFIG_TASKSTATS
Eric W. Biederman4bd6e322012-02-07 17:56:49 -080013extern void bacct_add_tsk(struct user_namespace *user_ns,
14 struct pid_namespace *pid_ns,
15 struct taskstats *stats, struct task_struct *tsk);
Jay Lanf3cef7a2006-09-30 23:28:55 -070016#else
Eric W. Biederman4bd6e322012-02-07 17:56:49 -080017static inline void bacct_add_tsk(struct user_namespace *user_ns,
18 struct pid_namespace *pid_ns,
19 struct taskstats *stats, struct task_struct *tsk)
Jay Lanf3cef7a2006-09-30 23:28:55 -070020{}
21#endif /* CONFIG_TASKSTATS */
22
Jay Lan9acc1852006-09-30 23:28:58 -070023#ifdef CONFIG_TASK_XACCT
24extern void xacct_add_tsk(struct taskstats *stats, struct task_struct *p);
Jay Lan8f0ab512006-09-30 23:28:59 -070025extern void acct_update_integrals(struct task_struct *tsk);
Frederic Weisbecker6fac4822012-11-13 14:20:55 +010026extern void acct_account_cputime(struct task_struct *tsk);
Jay Lan8f0ab512006-09-30 23:28:59 -070027extern void acct_clear_integrals(struct task_struct *tsk);
Jay Lan9acc1852006-09-30 23:28:58 -070028#else
29static inline void xacct_add_tsk(struct taskstats *stats, struct task_struct *p)
30{}
Jay Lan8f0ab512006-09-30 23:28:59 -070031static inline void acct_update_integrals(struct task_struct *tsk)
32{}
Frederic Weisbecker6fac4822012-11-13 14:20:55 +010033static inline void acct_account_cputime(struct task_struct *tsk)
34{}
Jay Lan8f0ab512006-09-30 23:28:59 -070035static inline void acct_clear_integrals(struct task_struct *tsk)
36{}
Jay Lan9acc1852006-09-30 23:28:58 -070037#endif /* CONFIG_TASK_XACCT */
38
Jay Lanf3cef7a2006-09-30 23:28:55 -070039#endif
Jay Lan9acc1852006-09-30 23:28:58 -070040
41