< prev index next >

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

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
   * Copyright (c) 2021, Azul Systems, Inc. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
--- 1,7 ---
  /*
!  * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
   * Copyright (c) 2021, Azul Systems, Inc. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as

*** 130,11 ***
    // when we actually install the exception.
    set_suspend_flag(_has_async_exception);
  }
  
  inline JavaThreadState JavaThread::thread_state() const    {
! #if defined(PPC64) || defined (AARCH64)
    // Use membars when accessing volatile _thread_state. See
    // Threads::create_vm() for size checks.
    return (JavaThreadState) Atomic::load_acquire((volatile jint*)&_thread_state);
  #else
    return _thread_state;
--- 130,11 ---
    // when we actually install the exception.
    set_suspend_flag(_has_async_exception);
  }
  
  inline JavaThreadState JavaThread::thread_state() const    {
! #if defined(PPC64) || defined (AARCH64) || defined(RISCV64)
    // Use membars when accessing volatile _thread_state. See
    // Threads::create_vm() for size checks.
    return (JavaThreadState) Atomic::load_acquire((volatile jint*)&_thread_state);
  #else
    return _thread_state;

*** 142,11 ***
  }
  
  inline void JavaThread::set_thread_state(JavaThreadState s) {
    assert(current_or_null() == NULL || current_or_null() == this,
           "state change should only be called by the current thread");
! #if defined(PPC64) || defined (AARCH64)
    // Use membars when accessing volatile _thread_state. See
    // Threads::create_vm() for size checks.
    Atomic::release_store((volatile jint*)&_thread_state, (jint)s);
  #else
    _thread_state = s;
--- 142,11 ---
  }
  
  inline void JavaThread::set_thread_state(JavaThreadState s) {
    assert(current_or_null() == NULL || current_or_null() == this,
           "state change should only be called by the current thread");
! #if defined(PPC64) || defined (AARCH64) || defined(RISCV64)
    // Use membars when accessing volatile _thread_state. See
    // Threads::create_vm() for size checks.
    Atomic::release_store((volatile jint*)&_thread_state, (jint)s);
  #else
    _thread_state = s;
< prev index next >