tsacct_kern.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * tsacct_kern.h - kernel header for system accounting over taskstats interface
  4. *
  5. * Copyright (C) Jay Lan SGI
  6. */
  7. #ifndef _LINUX_TSACCT_KERN_H
  8. #define _LINUX_TSACCT_KERN_H
  9. #include <linux/taskstats.h>
  10. #ifdef CONFIG_TASKSTATS
  11. extern void bacct_add_tsk(struct user_namespace *user_ns,
  12. struct pid_namespace *pid_ns,
  13. struct taskstats *stats, struct task_struct *tsk);
  14. #else
  15. static inline void bacct_add_tsk(struct user_namespace *user_ns,
  16. struct pid_namespace *pid_ns,
  17. struct taskstats *stats, struct task_struct *tsk)
  18. {}
  19. #endif /* CONFIG_TASKSTATS */
  20. #ifdef CONFIG_TASK_XACCT
  21. extern void xacct_add_tsk(struct taskstats *stats, struct task_struct *p);
  22. extern void acct_update_integrals(struct task_struct *tsk);
  23. extern void acct_account_cputime(struct task_struct *tsk);
  24. extern void acct_clear_integrals(struct task_struct *tsk);
  25. #else
  26. static inline void xacct_add_tsk(struct taskstats *stats, struct task_struct *p)
  27. {}
  28. static inline void acct_update_integrals(struct task_struct *tsk)
  29. {}
  30. static inline void acct_account_cputime(struct task_struct *tsk)
  31. {}
  32. static inline void acct_clear_integrals(struct task_struct *tsk)
  33. {}
  34. #endif /* CONFIG_TASK_XACCT */
  35. #endif