mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8289003: JavaThread::check_is_terminated() implementation should rely on Thread-SMR
Reviewed-by: dholmes, pchilanomate
This commit is contained in:
parent
2342684f2c
commit
441c33f0b1
3 changed files with 8 additions and 9 deletions
|
@ -564,9 +564,10 @@ bool JavaThread::is_interrupted(bool clear_interrupted) {
|
|||
void JavaThread::block_if_vm_exited() {
|
||||
if (_terminated == _vm_exited) {
|
||||
// _vm_exited is set at safepoint, and Threads_lock is never released
|
||||
// we will block here forever.
|
||||
// so we will block here forever.
|
||||
// Here we can be doing a jump from a safe state to an unsafe state without
|
||||
// proper transition, but it happens after the final safepoint has begun.
|
||||
// proper transition, but it happens after the final safepoint has begun so
|
||||
// this jump won't cause any safepoint problems.
|
||||
set_thread_state(_thread_in_vm);
|
||||
Threads_lock->lock();
|
||||
ShouldNotReachHere();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue