mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8226228: Make Threads_lock an always safepoint checked lock
Reviewed-by: coleenp, dcubed, dholmes
This commit is contained in:
parent
98fb7b85e5
commit
c6446d44b7
10 changed files with 32 additions and 20 deletions
|
@ -491,6 +491,10 @@ class Thread: public ThreadShadow {
|
|||
// Can this thread make Java upcalls
|
||||
virtual bool can_call_java() const { return false; }
|
||||
|
||||
// Is this a JavaThread that is on the VM's current ThreadsList?
|
||||
// If so it must participate in the safepoint protocol.
|
||||
virtual bool is_active_Java_thread() const { return false; }
|
||||
|
||||
// Casts
|
||||
virtual WorkerThread* as_Worker_thread() const { return NULL; }
|
||||
|
||||
|
@ -1247,6 +1251,10 @@ class JavaThread: public Thread {
|
|||
virtual bool is_Java_thread() const { return true; }
|
||||
virtual bool can_call_java() const { return true; }
|
||||
|
||||
virtual bool is_active_Java_thread() const {
|
||||
return on_thread_list() && !is_terminated();
|
||||
}
|
||||
|
||||
// Thread oop. threadObj() can be NULL for initial JavaThread
|
||||
// (or for threads attached via JNI)
|
||||
oop threadObj() const { return _threadObj; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue