Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Jay Lan | f3cef7a | 2006-09-30 23:28:55 -0700 | [diff] [blame] | 2 | /* |
| 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. Biederman | 4bd6e32 | 2012-02-07 17:56:49 -0800 | [diff] [blame] | 14 | extern void bacct_add_tsk(struct user_namespace *user_ns, |
| 15 | struct pid_namespace *pid_ns, |
| 16 | struct taskstats *stats, struct task_struct *tsk); |
Jay Lan | f3cef7a | 2006-09-30 23:28:55 -0700 | [diff] [blame] | 17 | #else |
Eric W. Biederman | 4bd6e32 | 2012-02-07 17:56:49 -0800 | [diff] [blame] | 18 | static 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 Lan | f3cef7a | 2006-09-30 23:28:55 -0700 | [diff] [blame] | 21 | {} |
| 22 | #endif /* CONFIG_TASKSTATS */ |
| 23 | |
Jay Lan | 9acc185 | 2006-09-30 23:28:58 -0700 | [diff] [blame] | 24 | #ifdef CONFIG_TASK_XACCT |
| 25 | extern void xacct_add_tsk(struct taskstats *stats, struct task_struct *p); |
Jay Lan | 8f0ab51 | 2006-09-30 23:28:59 -0700 | [diff] [blame] | 26 | extern void acct_update_integrals(struct task_struct *tsk); |
Frederic Weisbecker | 6fac482 | 2012-11-13 14:20:55 +0100 | [diff] [blame] | 27 | extern void acct_account_cputime(struct task_struct *tsk); |
Jay Lan | 8f0ab51 | 2006-09-30 23:28:59 -0700 | [diff] [blame] | 28 | extern void acct_clear_integrals(struct task_struct *tsk); |
Jay Lan | 9acc185 | 2006-09-30 23:28:58 -0700 | [diff] [blame] | 29 | #else |
| 30 | static inline void xacct_add_tsk(struct taskstats *stats, struct task_struct *p) |
| 31 | {} |
Jay Lan | 8f0ab51 | 2006-09-30 23:28:59 -0700 | [diff] [blame] | 32 | static inline void acct_update_integrals(struct task_struct *tsk) |
| 33 | {} |
Frederic Weisbecker | 6fac482 | 2012-11-13 14:20:55 +0100 | [diff] [blame] | 34 | static inline void acct_account_cputime(struct task_struct *tsk) |
| 35 | {} |
Jay Lan | 8f0ab51 | 2006-09-30 23:28:59 -0700 | [diff] [blame] | 36 | static inline void acct_clear_integrals(struct task_struct *tsk) |
| 37 | {} |
Jay Lan | 9acc185 | 2006-09-30 23:28:58 -0700 | [diff] [blame] | 38 | #endif /* CONFIG_TASK_XACCT */ |
| 39 | |
Jay Lan | f3cef7a | 2006-09-30 23:28:55 -0700 | [diff] [blame] | 40 | #endif |
Jay Lan | 9acc185 | 2006-09-30 23:28:58 -0700 | [diff] [blame] | 41 | |
| 42 | |