boolean DEBUG_CODE_PATCH = false;     VM_Magic.sync();  if (VM_Scheduler.syncObj == null) { VM_Scheduler.syncObj = new Object(); }    VM_Scheduler.toSyncProcessors = VM_Scheduler.numProcessors - 1;  synchronized(VM_Scheduler.syncObj) {  for (int i=0; i<VM_Scheduler.numProcessors; i++) { VM_Processor proc = VM_Scheduler.processors[i+1];  if (proc != VM_Processor.getCurrentProcessor()) { proc.needsSync = true; } } }  if (DEBUG_CODE_PATCH) { VM.sysWrite("processors to be synchronized : "); VM.sysWrite(VM_Scheduler.toSyncProcessors, false); VM.sysWrite("\n"); }   while (VM_Scheduler.toSyncProcessors > 0) { VM_Thread.getCurrentThread().yield(); }  if (DEBUG_CODE_PATCH) { VM.sysWrite("all processors get synchronized!\n"); }
  public final void applyCodePatches(VM_CompiledMethod cm) throws VM_PragmaInterruptible {    if (patchMap != null) {      INSTRUCTION[] code = cm.getInstructions();      for (int idx=0; idx<patchMap.length; idx += 2) {	VM_Assembler.patchCode(code, patchMap[idx], patchMap[idx+1]);      }    }  }