mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8230003: Make Monitor inherit from Mutex
Reverse inheritance that makes more sense. Reviewed-by: dholmes, rehn, pchilanomate
This commit is contained in:
parent
a405118f90
commit
da18495f38
10 changed files with 143 additions and 169 deletions
|
@ -971,7 +971,7 @@ void Thread::print_value_on(outputStream* st) const {
|
|||
|
||||
#ifdef ASSERT
|
||||
void Thread::print_owned_locks_on(outputStream* st) const {
|
||||
Monitor *cur = _owned_locks;
|
||||
Mutex* cur = _owned_locks;
|
||||
if (cur == NULL) {
|
||||
st->print(" (no locks) ");
|
||||
} else {
|
||||
|
@ -1011,7 +1011,7 @@ void Thread::check_for_valid_safepoint_state(bool potential_vm_operation) {
|
|||
if (potential_vm_operation && !Universe::is_bootstrapping()) {
|
||||
// Make sure we do not hold any locks that the VM thread also uses.
|
||||
// This could potentially lead to deadlocks
|
||||
for (Monitor *cur = _owned_locks; cur; cur = cur->next()) {
|
||||
for (Mutex* cur = _owned_locks; cur; cur = cur->next()) {
|
||||
// Threads_lock is special, since the safepoint synchronization will not start before this is
|
||||
// acquired. Hence, a JavaThread cannot be holding it at a safepoint. So is VMOperationRequest_lock,
|
||||
// since it is used to transfer control between JavaThreads and the VMThread
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue