8284068: riscv: should call Atomic::release_store in JavaThread::set_thread_state

Reviewed-by: shade
This commit is contained in:
Fei Yang 2022-04-02 02:46:26 +00:00
parent 0b09f70a73
commit e5e1aab459

View File

@ -162,7 +162,7 @@ inline JavaThreadState JavaThread::thread_state() const {
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)
#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);