Skip to content

Commit

Permalink
compile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rsc committed May 31, 2009
1 parent 34295f4 commit 27ff8f0
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pinit(void)
static struct proc*
allocproc(void)
{
int i;
struct proc *p;

acquire(&ptable.lock);
Expand Down Expand Up @@ -209,7 +208,6 @@ void
scheduler(void)
{
struct proc *p;
int i;

for(;;){
// Enable interrupts on this processor, in lieu of saving intena.
Expand Down Expand Up @@ -327,7 +325,7 @@ wakeup1(void *chan)
{
struct proc *p;

for(p = proc; p < &proc[NPROC]; p++)
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
if(p->state == SLEEPING && p->chan == chan)
p->state = RUNNABLE;
}
Expand Down Expand Up @@ -414,7 +412,7 @@ int
wait(void)
{
struct proc *p;
int i, havekids, pid;
int havekids, pid;

acquire(&ptable.lock);
for(;;){
Expand Down Expand Up @@ -465,7 +463,7 @@ procdump(void)
[RUNNING] "run ",
[ZOMBIE] "zombie"
};
int i, j;
int i;
struct proc *p;
char *state;
uint pc[10];
Expand All @@ -480,8 +478,8 @@ procdump(void)
cprintf("%d %s %s", p->pid, state, p->name);
if(p->state == SLEEPING){
getcallerpcs((uint*)p->context->ebp+2, pc);
for(j=0; j<10 && pc[j] != 0; j++)
cprintf(" %p", pc[j]);
for(i=0; i<10 && pc[i] != 0; i++)
cprintf(" %p", pc[i]);
}
cprintf("\n");
}
Expand Down

0 comments on commit 27ff8f0

Please sign in to comment.