Top


定義場所(file name)

hotspot/src/share/vm/classfile/javaClasses.cpp

説明(description)

// Write the thread status value to threadStatus field in java.lang.Thread java class.

名前(function name)

void java_lang_Thread::set_thread_status(oop java_thread,
                                         java_lang_Thread::ThreadStatus status) {

本体部(body)

  {- -------------------------------------------
  (1) (assert)
      ---------------------------------------- -}

      assert(JavaThread::current()->thread_state() == _thread_in_vm, "Java Thread is not running in vm");

  {- -------------------------------------------
  (1) oopDesc::int_field_put() で threadStatus フィールドに値をセットするだけ.

      (ただし, _thread_status_offset が 0 以下の場合には処理は行わない.
       これは, JDK 1.5 以降にしか threadStatus フィールドは存在しないため.)
      ---------------------------------------- -}

      // The threadStatus is only present starting in 1.5
      if (_thread_status_offset > 0) {
        java_thread->int_field_put(_thread_status_offset, status);
      }
    }

This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.