aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Lan <jlan@engr.sgi.com>2006-10-01 02:28:59 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 03:39:29 -0400
commit8f0ab5147951267134612570604cf8341901a80c (patch)
treed394edb3ab69396128e7971136f05fd71d863ece /include
parent9acc1853519a0473620d424105f9d49ea5b4e62e (diff)
[PATCH] csa: convert CONFIG tag for extended accounting routines
There were a few accounting data/macros that are used in CSA but are #ifdef'ed inside CONFIG_BSD_PROCESS_ACCT. This patch is to change those ifdef's from CONFIG_BSD_PROCESS_ACCT to CONFIG_TASK_XACCT. A few defines are moved from kernel/acct.c and include/linux/acct.h to kernel/tsacct.c and include/linux/tsacct_kern.h. Signed-off-by: Jay Lan <jlan@sgi.com> Cc: Shailabh Nagar <nagar@watson.ibm.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Jes Sorensen <jes@sgi.com> Cc: Chris Sturtivant <csturtiv@sgi.com> Cc: Tony Ernst <tee@sgi.com> Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/acct.h4
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/tsacct_kern.h6
3 files changed, 7 insertions, 5 deletions
diff --git a/include/linux/acct.h b/include/linux/acct.h
index e86bae7324d2..0496d1f09952 100644
--- a/include/linux/acct.h
+++ b/include/linux/acct.h
@@ -124,16 +124,12 @@ extern void acct_auto_close(struct super_block *sb);
124extern void acct_init_pacct(struct pacct_struct *pacct); 124extern void acct_init_pacct(struct pacct_struct *pacct);
125extern void acct_collect(long exitcode, int group_dead); 125extern void acct_collect(long exitcode, int group_dead);
126extern void acct_process(void); 126extern void acct_process(void);
127extern void acct_update_integrals(struct task_struct *tsk);
128extern void acct_clear_integrals(struct task_struct *tsk);
129#else 127#else
130#define acct_auto_close_mnt(x) do { } while (0) 128#define acct_auto_close_mnt(x) do { } while (0)
131#define acct_auto_close(x) do { } while (0) 129#define acct_auto_close(x) do { } while (0)
132#define acct_init_pacct(x) do { } while (0) 130#define acct_init_pacct(x) do { } while (0)
133#define acct_collect(x,y) do { } while (0) 131#define acct_collect(x,y) do { } while (0)
134#define acct_process() do { } while (0) 132#define acct_process() do { } while (0)
135#define acct_update_integrals(x) do { } while (0)
136#define acct_clear_integrals(task) do { } while (0)
137#endif 133#endif
138 134
139/* 135/*
diff --git a/include/linux/sched.h b/include/linux/sched.h
index fc4a9873ec10..4ddeb0f982fb 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -981,7 +981,7 @@ struct task_struct {
981 wait_queue_t *io_wait; 981 wait_queue_t *io_wait;
982/* i/o counters(bytes read/written, #syscalls */ 982/* i/o counters(bytes read/written, #syscalls */
983 u64 rchar, wchar, syscr, syscw; 983 u64 rchar, wchar, syscr, syscw;
984#if defined(CONFIG_BSD_PROCESS_ACCT) 984#if defined(CONFIG_TASK_XACCT)
985 u64 acct_rss_mem1; /* accumulated rss usage */ 985 u64 acct_rss_mem1; /* accumulated rss usage */
986 u64 acct_vm_mem1; /* accumulated virtual memory usage */ 986 u64 acct_vm_mem1; /* accumulated virtual memory usage */
987 clock_t acct_stimexpd; /* clock_t-converted stime since last update */ 987 clock_t acct_stimexpd; /* clock_t-converted stime since last update */
diff --git a/include/linux/tsacct_kern.h b/include/linux/tsacct_kern.h
index 74102dcae67a..7e50ac795b0b 100644
--- a/include/linux/tsacct_kern.h
+++ b/include/linux/tsacct_kern.h
@@ -18,9 +18,15 @@ static inline void bacct_add_tsk(struct taskstats *stats, struct task_struct *ts
18 18
19#ifdef CONFIG_TASK_XACCT 19#ifdef CONFIG_TASK_XACCT
20extern void xacct_add_tsk(struct taskstats *stats, struct task_struct *p); 20extern void xacct_add_tsk(struct taskstats *stats, struct task_struct *p);
21extern void acct_update_integrals(struct task_struct *tsk);
22extern void acct_clear_integrals(struct task_struct *tsk);
21#else 23#else
22static inline void xacct_add_tsk(struct taskstats *stats, struct task_struct *p) 24static inline void xacct_add_tsk(struct taskstats *stats, struct task_struct *p)
23{} 25{}
26static inline void acct_update_integrals(struct task_struct *tsk)
27{}
28static inline void acct_clear_integrals(struct task_struct *tsk)
29{}
24#endif /* CONFIG_TASK_XACCT */ 30#endif /* CONFIG_TASK_XACCT */
25 31
26#endif 32#endif