proc.c
void
yield(void)
{
  acquire(&ptable.lock);  //DOC: yieldlock
  proc->state = RUNNABLE;

  if(strategy == 1 || (strategy == 3 && grtexists() == 0 && frrexists() == 1)){
    insert(queue_frr, proc, &queuedata_frr);
  }

  sched();
  release(&ptable.lock);
}
// Give up the CPU for one scheduling round.
Give up the CPU for one scheduling round.
Give up the CPU for one scheduling round .
void
yield(void)
{
  acquire(&ptable.lock);  
  proc->state = RUNNABLE;
  if(strategy == 1 || (strategy == 3 && grtexists() == 0 && frrexists() == 1)){
    insert(queue_frr, proc, &queuedata_frr);
  }
  sched();
  release(&ptable.lock);
}
void yield ( void ) { acquire ( & ptable . lock ) ; proc -> state = RUNNABLE ; if ( strategy == 1 || ( strategy == 3 && grtexists ( ) == 0 && frrexists ( ) == 1 ) ) { insert ( queue_frr , proc , & queuedata_frr ) ; } sched ( ) ; release ( & ptable . lock ) ; }
Give up the CPU for one scheduling round.
Give up the CPU for one scheduling round .
//DOC: yieldlock