tsacct_kern.h 1.2 KB

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