From cbb6e809943f04ca0927e73105b9cd10745d6f9f Mon Sep 17 00:00:00 2001 From: Rwik2000 Date: Fri, 13 Nov 2020 19:58:07 +0530 Subject: [PATCH] proc name included --- proc.c | 15 ++++++++------- proc.h | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/proc.c b/proc.c index 44262a4..74e2005 100644 --- a/proc.c +++ b/proc.c @@ -404,6 +404,7 @@ mlfq(struct proc **q_current,struct proc **q_next,int *current, int *next,struct pstat_var.pid[i] = p->pid; pstat_var.priority[i] = p->priority; pstat_var.state[i] = p->state; + safestrcpy(pstat_var.name[i],p->name, sizeof(p->name)); int j; for(j = 0; j < 4; ++j){ pstat_var.ticks[i][j] = p->myticks[j]; @@ -746,21 +747,21 @@ int getpinfo(struct pstat* pstat_xyz) { - cprintf("pid \t state \t\t priority \t\t ticks \n"); + cprintf("pid \t name \t\t state \t\t priority \t\t ticks \n"); for(int i=0;i