mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
8029396: PPC64 (part 212): Several memory ordering fixes in C-code
Memory ordering fixes in GC and other runtime code showing on PPC64. Reviewed-by: kvn, coleenp
This commit is contained in:
parent
1b2bf0be10
commit
46c4ef6572
16 changed files with 99 additions and 34 deletions
|
@ -1044,8 +1044,14 @@ class JavaThread: public Thread {
|
|||
address last_Java_pc(void) { return _anchor.last_Java_pc(); }
|
||||
|
||||
// Safepoint support
|
||||
JavaThreadState thread_state() const { return _thread_state; }
|
||||
void set_thread_state(JavaThreadState s) { _thread_state=s; }
|
||||
// Use membars when accessing volatile _thread_state. See
|
||||
// Threads::create_vm() for size checks.
|
||||
JavaThreadState thread_state() const {
|
||||
return (JavaThreadState) OrderAccess::load_acquire((volatile jint*)&_thread_state);
|
||||
}
|
||||
void set_thread_state(JavaThreadState s) {
|
||||
OrderAccess::release_store((volatile jint*)&_thread_state, (jint)s);
|
||||
}
|
||||
ThreadSafepointState *safepoint_state() const { return _safepoint_state; }
|
||||
void set_safepoint_state(ThreadSafepointState *state) { _safepoint_state = state; }
|
||||
bool is_at_poll_safepoint() { return _safepoint_state->is_at_poll_safepoint(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue