]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] real-time info in /proc/<pid>/stats
authorRobert Love <rml@tech9.net>
Tue, 28 May 2002 10:02:12 +0000 (03:02 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 28 May 2002 10:02:12 +0000 (03:02 -0700)
Attached patch adds output of rt_priority and policy to
/proc/<pid>/stats.

This will not break compatibility with existing applications and will
allow ps(1) and friends to display pertinent scheduling information.

fs/proc/array.c

index c727d1487a1ef82f7ef369d645f79307a882c55d..6dda796f87b557325b40de941fe65dee53bf8624 100644 (file)
@@ -346,7 +346,7 @@ int proc_pid_stat(struct task_struct *task, char * buffer)
        read_unlock(&tasklist_lock);
        res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
 %lu %lu %lu %lu %lu %ld %ld %ld %ld %ld %ld %lu %lu %ld %lu %lu %lu %lu %lu \
-%lu %lu %lu %lu %lu %lu %lu %lu %d %d\n",
+%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
                task->pid,
                task->comm,
                state,
@@ -389,7 +389,9 @@ int proc_pid_stat(struct task_struct *task, char * buffer)
                task->nswap,
                task->cnswap,
                task->exit_signal,
-               task->thread_info->cpu);
+               task->thread_info->cpu,
+               task->rt_priority,
+               task->policy);
        if(mm)
                mmput(mm);
        return res;