summaryrefslogtreecommitdiff
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-04-26 09:02:54 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-04-26 09:02:54 -0700
commit8d67bea68e189c0552e7734f3d78baeff8beef7e (patch)
treeb07429cf3097d6498af40e6cb6193fb43ab64ee3 /fs/proc/array.c
parent1c9cdbfc27d0a0a6f9a876145a226d50fcb8aa80 (diff)
[PATCH] fs/proc/array.c: workaround for gcc-2.96
From: Alan Stern <stern@rowland.harvard.edu> This patch is needed to work around gcc-2.96's limited ability to cope with long long intermediate expression types. I don't know why the code compiled okay earlier and failed now.
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r--fs/proc/array.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 40d29f078984..6bdd15bfb402 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -304,6 +304,7 @@ int proc_pid_stat(struct task_struct *task, char * buffer)
pid_t ppid, pgid = -1, sid = -1;
int num_threads = 0;
struct mm_struct *mm;
+ unsigned long long start_time;
state = *get_task_state(task);
vsize = eip = esp = 0;
@@ -349,6 +350,10 @@ int proc_pid_stat(struct task_struct *task, char * buffer)
read_lock(&tasklist_lock);
ppid = task->pid ? task->real_parent->pid : 0;
read_unlock(&tasklist_lock);
+
+ /* Temporary variable needed for gcc-2.96 */
+ start_time = jiffies_64_to_clock_t(task->start_time - INITIAL_JIFFIES);
+
res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu \
%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
@@ -373,8 +378,7 @@ int proc_pid_stat(struct task_struct *task, char * buffer)
nice,
num_threads,
jiffies_to_clock_t(task->it_real_value),
- (unsigned long long)
- jiffies_64_to_clock_t(task->start_time - INITIAL_JIFFIES),
+ start_time,
vsize,
mm ? mm->rss : 0, /* you might want to shift this left 3 */
task->rlim[RLIMIT_RSS].rlim_cur,