mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8293922: Extend barrier-less Java thread transitions to native transitions
Reviewed-by: mdoerr, pchilanomate, dcubed
This commit is contained in:
parent
a07902bcbe
commit
1b496064bf
2 changed files with 10 additions and 5 deletions
|
@ -145,9 +145,9 @@ 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);
|
||||
return Atomic::load_acquire(&_thread_state);
|
||||
#else
|
||||
return _thread_state;
|
||||
return Atomic::load(&_thread_state);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -157,9 +157,9 @@ inline void JavaThread::set_thread_state(JavaThreadState s) {
|
|||
#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);
|
||||
Atomic::release_store(&_thread_state, s);
|
||||
#else
|
||||
_thread_state = s;
|
||||
Atomic::store(&_thread_state, s);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue