Top


定義場所(file name)

hotspot/src/share/vm/runtime/thread.hpp

説明(description)

  // Special method to handle a pending external suspend request
  // when a suspend equivalent condition lifts.

名前(function name)

  bool handle_special_suspend_equivalent_condition() {

本体部(body)

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

        assert(is_suspend_equivalent(),
          "should only be called in a suspend equivalence condition");

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

        MutexLockerEx ml(SR_lock(), Mutex::_no_safepoint_check_flag);

  {- -------------------------------------------
  (1) JavaThread::is_external_suspend() の値を返すだけ.

      (なお, 値が false だった場合には, 直近で suspend する必要は無いので
       JavaThread::clear_suspend_equivalent() で
       _suspend_equivalent フラグをリセットしておく)
      ---------------------------------------- -}

        bool ret = is_external_suspend();
        if (!ret) {
          // not about to self-suspend so clear suspend equivalence
          clear_suspend_equivalent();
        }
        // implied else:
        // We have a pending external suspend request so we leave the
        // suspend_equivalent flag set until java_suspend_self() sets
        // the ext_suspended flag and clears the suspend_equivalent
        // flag. This insures that wait_for_ext_suspend_completion()
        // will return consistent values.
        return ret;
      }

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