--- zzzz-none-000/linux-2.4.17/fs/proc/array.c 2001-10-11 16:00:01.000000000 +0000 +++ sangam-fb-401/linux-2.4.17/fs/proc/array.c 2005-07-20 11:54:06.000000000 +0000 @@ -358,8 +358,17 @@ task->cmin_flt, task->maj_flt, task->cmaj_flt, +#if defined(CONFIG_LOG_SYSTEM_TIMES) + /*--- (unsigned long)(task->real_times.tms_utime / 750000ull / 2ull), ---*/ + /*--- (unsigned long)(task->real_times.tms_stime / 750000ull / 2ull), ---*/ + (unsigned long)(task->real_times.tms_utime >> 8) / (5850 / 2), + (unsigned long)(task->real_times.tms_stime >> 8) / (5850 / 2), + /*--- (unsigned long)(task->real_times.tms_utime >> 12) / 365, ---*/ + /*--- (unsigned long)(task->real_times.tms_stime >> 12) / 365, ---*/ +#else /*--- #if defined(CONFIG_LOG_SYSTEM_TIMES) ---*/ task->times.tms_utime, task->times.tms_stime, +#endif /*--- #else ---*/ /*--- #if defined(CONFIG_LOG_SYSTEM_TIMES) ---*/ task->times.tms_cutime, task->times.tms_cstime, priority, @@ -587,6 +596,8 @@ return len; } +/*------------------------------------------------------------------------------------------*\ +\*------------------------------------------------------------------------------------------*/ ssize_t proc_pid_read_maps (struct task_struct *task, struct file * file, char * buf, size_t count, loff_t *ppos) { @@ -675,6 +686,26 @@ return retval; } +/*------------------------------------------------------------------------------------------*\ +\*------------------------------------------------------------------------------------------*/ +ssize_t proc_pid_read_addr (struct task_struct *task, struct file * file, char * buf, + size_t count, loff_t *ppos) +{ + int len = 0; + + snprintf(buf, count, "task=0x%x pid=%u\n", (unsigned int)task, task->pid); + len = strlen(buf); + + if(*ppos >= len) + return 0; + + *ppos += len; + + return len; +} + +/*------------------------------------------------------------------------------------------*\ +\*------------------------------------------------------------------------------------------*/ #ifdef CONFIG_SMP int proc_pid_cpu(struct task_struct *task, char * buffer) {