blob: d8ddce26e1f184bc7c88dab4b9c0c4f5163c7585 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Jay Lanf3cef7a2006-09-30 23:28:55 -07002/*
3 * tsacct_kern.h - kernel header for system accounting over taskstats interface
4 *
5 * Copyright (C) Jay Lan SGI
6 */
7
8#ifndef _LINUX_TSACCT_KERN_H
9#define _LINUX_TSACCT_KERN_H
10
11#include <linux/taskstats.h>
12
13#ifdef CONFIG_TASKSTATS
Eric W. Biederman4bd6e322012-02-07 17:56:49 -080014extern void bacct_add_tsk(struct user_namespace *user_ns,
15 struct pid_namespace *pid_ns,
16 struct taskstats *stats, struct task_struct *tsk);
Jay Lanf3cef7a2006-09-30 23:28:55 -070017#else
Eric W. Biederman4bd6e322012-02-07 17:56:49 -080018static inline void bacct_add_tsk(struct user_namespace *user_ns,
19 struct pid_namespace *pid_ns,
20 struct taskstats *stats, struct task_struct *tsk)
Jay Lanf3cef7a2006-09-30 23:28:55 -070021{}
22#endif /* CONFIG_TASKSTATS */
23
Jay Lan9acc1852006-09-30 23:28:58 -070024#ifdef CONFIG_TASK_XACCT
25extern void xacct_add_tsk(struct taskstats *stats, struct task_struct *p);
Jay Lan8f0ab512006-09-30 23:28:59 -070026extern void acct_update_integrals(struct task_struct *tsk);
Frederic Weisbecker6fac4822012-11-13 14:20:55 +010027extern void acct_account_cputime(struct task_struct *tsk);
Jay Lan8f0ab512006-09-30 23:28:59 -070028extern void acct_clear_integrals(struct task_struct *tsk);
Jay Lan9acc1852006-09-30 23:28:58 -070029#else
30static inline void xacct_add_tsk(struct taskstats *stats, struct task_struct *p)
31{}
Jay Lan8f0ab512006-09-30 23:28:59 -070032static inline void acct_update_integrals(struct task_struct *tsk)
33{}
Frederic Weisbecker6fac4822012-11-13 14:20:55 +010034static inline void acct_account_cputime(struct task_struct *tsk)
35{}
Jay Lan8f0ab512006-09-30 23:28:59 -070036static inline void acct_clear_integrals(struct task_struct *tsk)
37{}
Jay Lan9acc1852006-09-30 23:28:58 -070038#endif /* CONFIG_TASK_XACCT */
39
Jay Lanf3cef7a2006-09-30 23:28:55 -070040#endif
Jay Lan9acc1852006-09-30 23:28:58 -070041
42