os::free_thread(OSThread* osthread)

  • カレントスレッドを解放する
//Linux版(jdk7/hotspot/src/os/linux/vm/os_linux.cpp)
// Free Linux resources related to the OSThread
void os::free_thread(OSThread* osthread) {
  assert(osthread != NULL, "osthread not set");

  if (Thread::current()->osthread() == osthread) {
    // Restore caller's signal mask
    sigset_t sigmask = osthread->caller_sigmask();
    pthread_sigmask(SIG_SETMASK, &sigmask, NULL);
   }

  delete osthread;
}