boolean waitForState(Processor p,int state){
synchronized (waitSync) {
    try {
      while (p.getState() < state && stateTransitionOK)       waitSync.wait();
    }
 catch (    Exception e) {
    }
  }
  return stateTransitionOK;
}

boolean waitForState ( Processor p , int state ) { synchronized ( waitSync ) { try { while ( p . getState ( ) < state && stateTransitionOK ) waitSync . wait ( ) ; } catch ( Exception e ) { } } return stateTransitionOK ; }
block until the processor has transitioned to the given state . return false if the transition failed .
