cleanup types in proc.c Reference: /n/atom/patch/applied/9procclean Date: Thu Jun 5 14:13:49 CES 2014 Signed-off-by: quanstro@quanstro.net --- /sys/src/9/port/proc.c Thu Jun 5 14:13:46 2014 +++ /sys/src/9/port/proc.c Thu Jun 5 14:13:47 2014 @@ -5,6 +5,7 @@ #include "fns.h" #include "../port/error.h" #include "../port/edf.h" +#include "errstr.h" #include int schedgain = 30; /* units in seconds */ @@ -265,8 +266,7 @@ void updatecpu(Proc *p) { - int n, t, ocpu; - int D = schedgain*HZ*Scaling; + int D, n, t, ocpu; if(p->edf) return; @@ -277,6 +277,7 @@ if(n == 0) return; + D = schedgain*HZ*Scaling; if(n > D) n = D; @@ -602,27 +603,27 @@ p->state = Scheding; p->psstate = "New"; - p->mach = 0; - p->qnext = 0; + p->mach = nil; + p->qnext = nil; p->nchild = 0; p->nwait = 0; - p->waitq = 0; - p->parent = 0; - p->pgrp = 0; - p->egrp = 0; - p->fgrp = 0; - p->rgrp = 0; - p->pdbg = 0; + p->waitq = nil; + p->parent = nil; + p->pgrp = nil; + p->egrp = nil; + p->fgrp = nil; + p->rgrp = nil; + p->pdbg = nil; p->fpstate = FPinit; p->kp = 0; if(up && up->procctl == Proc_tracesyscall) p->procctl = Proc_tracesyscall; else p->procctl = 0; - p->syscalltrace = 0; + p->syscalltrace = nil; p->notepending = 0; p->nnote = 0; - p->ureg = 0; + p->ureg = nil; p->privatemem = 0; p->noswap = 0; p->errstr = p->errbuf0; @@ -647,8 +648,8 @@ p->kstack = smalloc(KSTACK); /* sched params */ - p->mp = 0; - p->wired = 0; + p->mp = nil; + p->wired = nil; procpriority(p, PriNormal, 0); p->cpu = 0; p->lastupdate = MACHP(0)->ticks*Scaling; @@ -1242,7 +1243,7 @@ void dumpaproc(Proc *p) { - ulong bss; + uintptr bss; char *s; if(p == 0) @@ -1437,8 +1438,6 @@ } } -#include "errstr.h" - void error(char *err) { @@ -1471,7 +1470,7 @@ { int i; Segment *s; - ulong l, max; + uintptr l, max; Proc *p, *ep, *kp; max = 0;