mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8232733: Remove need to grab Threads_lock while processing handshakes
Threads_lock is not acquired anymore while processing handshakes Reviewed-by: coleenp, rehn, dcubed, dholmes
This commit is contained in:
parent
94e8d6eca4
commit
57ece4c21a
7 changed files with 37 additions and 34 deletions
|
@ -736,10 +736,7 @@ static bool safepoint_safe_with(JavaThread *thread, JavaThreadState state) {
|
|||
}
|
||||
|
||||
bool SafepointSynchronize::handshake_safe(JavaThread *thread) {
|
||||
// This function must be called with the Threads_lock held so an externally
|
||||
// suspended thread cannot be resumed thus it is safe.
|
||||
assert(Threads_lock->owned_by_self() && Thread::current()->is_VM_thread(),
|
||||
"Must hold Threads_lock and be VMThread");
|
||||
assert(Thread::current()->is_VM_thread(), "Must be VMThread");
|
||||
if (thread->is_ext_suspended() || thread->is_terminated()) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue