proc.c
//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;
	    if(policyNumber == 3) {           
		  if (p->ntickets < 90) {
			  p->ntickets += 10;
		  }
	    } 
	  }   
  }
}
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 ; if ( policyNumber == 3 ) { if ( p -> ntickets < 90 ) { p -> ntickets += 10 ; } } } } }
PAGEBREAK!
PAGEBREAK!