8221207: Redo JDK-8218446 - SuspendAtExit hangs

Reviewed-by: rehn, dcubed
This commit is contained in:
David Holmes 2019-03-25 00:57:03 -04:00
parent 5793068c77
commit ccef9efb14
2 changed files with 47 additions and 61 deletions

View file

@ -1348,10 +1348,16 @@ class JavaThread: public Thread {
inline void clear_ext_suspended();
public:
void java_suspend();
void java_resume();
int java_suspend_self();
void java_suspend(); // higher-level suspension logic called by the public APIs
void java_resume(); // higher-level resume logic called by the public APIs
int java_suspend_self(); // low-level self-suspension mechanics
private:
// mid-level wrapper around java_suspend_self to set up correct state and
// check for a pending safepoint at the end
void java_suspend_self_with_safepoint_check();
public:
void check_and_wait_while_suspended() {
assert(JavaThread::current() == this, "sanity check");