if (MM_Interface.NEEDS_WRITE_BARRIER) MM_Interface.arrayStoreWriteBarrier(VM_Scheduler.threads, threadSlot, this);
  private void assignThreadSlot() {    for (int cnt = VM_Scheduler.threads.length; --cnt >= 1; )       {       int index = VM_Scheduler.threadAllocationIndex;       if (++VM_Scheduler.threadAllocationIndex == VM_Scheduler.threads.length)          VM_Scheduler.threadAllocationIndex = 1;       if (VM_Scheduler.threads[index] == null)         {         //  Problem:         //  We'd like to say "VM_Scheduler.threads[index] = this;"         //  but can't do "checkstore" without losing control         //         threadSlot = index;         VM_Magic.setObjectAtOffset(VM_Scheduler.threads,threadSlot << LOG_BYTES_IN_ADDRESS, this);         return;         }       }    VM.sysFail("too many threads"); // !!TODO: grow threads[] array  }