proc.c
static void
wakeup1(void *chan)
{
  struct proc *p;

  for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
    if(p->state == SLEEPING && p->chan == chan){
      p->state = RUNNABLE;
     
      
    }
  }
}
//PAGEBREAK!
// Wake up all processes sleeping on chan.
// The ptable lock must be held.
PAGEBREAK.
Wake up all processes sleeping on chan.
The ptable lock must be held.
PAGEBREAK . Wake up all processes sleeping on chan . The ptable lock must be held .
static void
wakeup1(void *chan)
{
  struct proc *p;
  for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
    if(p->state == SLEEPING && p->chan == chan){
      p->state = RUNNABLE;
    }
  }
}
static void wakeup1 ( void * chan ) { struct proc * p ; for ( p = ptable . proc ; p < & ptable . proc [ NPROC ] ; p ++ ) { if ( p -> state == SLEEPING && p -> chan == chan ) { p -> state = RUNNABLE ; } } }
PAGEBREAK!
PAGEBREAK!