private static final boolean traceDetails = true;
private static final boolean traceDetails = false;
  static void processorExit(int rc) {    // trace("VM_Scheduler", ("Exiting with " + numProcessors + " pthreads."));    // set flag to get all idle threads to exit to VM_Thread.terminate()    terminated = true;    // TODO:    // Get the collector to free system memory:  no more allocation beyond this point    // Terminate the pthread: each processor waits for the next one    // find the pthread to wait for    VM_Processor myVP = VM_Processor.getCurrentProcessor();    VM_Processor VPtoWaitFor = null;    for (int i=1; i<numProcessors; i++) {      if (processors[i] == myVP) {        VPtoWaitFor = processors[i+1];        break;      }    }    // each join with the expected pthread     if (VPtoWaitFor!=null) {      VM.sysCall1(VM_BootRecord.the_boot_record.sysPthreadJoinIP,                  VPtoWaitFor.pthread_id);    }    // then exit myself with pthread_exit    VM.sysCall0(VM_BootRecord.the_boot_record.sysPthreadExitIP);	    // does not return    if (VM.VerifyAssertions) VM.assert(VM.NOT_REACHED);  }  private static final boolean traceDetails = true;  // Print out message in format "p[j] (cez#td) who: what", where:  //    p  = processor id  //    j  = java thread id  //    c* = ava thread id of the owner of threadCreationMutex (if any)  //    e* = java thread id of the owner of threadExecutionMutex (if any)  //    z* = VM_Processor.getCurrentProcessor().threadSwitchingEnabledCount  //         (0 means thread switching is enabled outside of the call to debug)  //    t* = numActiveThreads  //    d* = numDaemons  //  // * parenthetical values, printed only if traceDetails = true)  //  // We serialize against a mutex to avoid intermingling debug output from multiple threads.  //  public static void trace(String who, String what) {    lockOutput();    VM_Processor.getCurrentProcessor().disableThreadSwitching();    writeDecimal(VM_Processor.getCurrentProcessorId());    writeString("[");    writeDecimal(VM_Thread.getCurrentThread().getIndex());    writeString("] ");    if (traceDetails) {      writeString("(");      // writeDecimal(threadCreationMutex.owner);      // writeString("-");      // writeDecimal(-VM_Processor.getCurrentProcessor().threadSwitchingEnabledCount);      // writeString("#");      writeDecimal(numDaemons);      writeString("/");      writeDecimal(numActiveThreads);      writeString(") ");    }    writeString(who);    writeString(": ");    writeString(what);    writeString("\n");    VM_Processor.getCurrentProcessor().enableThreadSwitching();    unlockOutput();  }