mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 09:34:38 +02:00
8183198: Factor out thread state serialization into a proper helper function
Reviewed-by: tschatzl, eosterlund, coleenp
This commit is contained in:
parent
cf0d8c433e
commit
d39a34d689
10 changed files with 50 additions and 233 deletions
|
@ -2398,16 +2398,8 @@ void JavaThread::check_safepoint_and_suspend_for_native_trans(JavaThread *thread
|
|||
thread->set_thread_state(_thread_blocked);
|
||||
thread->java_suspend_self();
|
||||
thread->set_thread_state(state);
|
||||
// Make sure new state is seen by VM thread
|
||||
if (os::is_MP()) {
|
||||
if (UseMembar) {
|
||||
// Force a fence between the write above and read below
|
||||
OrderAccess::fence();
|
||||
} else {
|
||||
// Must use this rather than serialization page in particular on Windows
|
||||
InterfaceSupport::serialize_memory(thread);
|
||||
}
|
||||
}
|
||||
|
||||
InterfaceSupport::serialize_thread_state_with_handler(thread);
|
||||
}
|
||||
|
||||
if (SafepointSynchronize::do_call_back()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue