提交 a541bef6 编写于 作者: G goetz

8032634: Add #ifdef PPC64 around OrderAccess operations on _thread_state.

Reviewed-by: dholmes, kvn
上级 beb66f5c
...@@ -1044,6 +1044,10 @@ class JavaThread: public Thread { ...@@ -1044,6 +1044,10 @@ class JavaThread: public Thread {
address last_Java_pc(void) { return _anchor.last_Java_pc(); } address last_Java_pc(void) { return _anchor.last_Java_pc(); }
// Safepoint support // Safepoint support
#ifndef PPC64
JavaThreadState thread_state() const { return _thread_state; }
void set_thread_state(JavaThreadState s) { _thread_state = s; }
#else
// Use membars when accessing volatile _thread_state. See // Use membars when accessing volatile _thread_state. See
// Threads::create_vm() for size checks. // Threads::create_vm() for size checks.
JavaThreadState thread_state() const { JavaThreadState thread_state() const {
...@@ -1052,6 +1056,7 @@ class JavaThread: public Thread { ...@@ -1052,6 +1056,7 @@ class JavaThread: public Thread {
void set_thread_state(JavaThreadState s) { void set_thread_state(JavaThreadState s) {
OrderAccess::release_store((volatile jint*)&_thread_state, (jint)s); OrderAccess::release_store((volatile jint*)&_thread_state, (jint)s);
} }
#endif
ThreadSafepointState *safepoint_state() const { return _safepoint_state; } ThreadSafepointState *safepoint_state() const { return _safepoint_state; }
void set_safepoint_state(ThreadSafepointState *state) { _safepoint_state = state; } void set_safepoint_state(ThreadSafepointState *state) { _safepoint_state = state; }
bool is_at_poll_safepoint() { return _safepoint_state->is_at_poll_safepoint(); } bool is_at_poll_safepoint() { return _safepoint_state->is_at_poll_safepoint(); }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册