mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +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
|
@ -736,7 +736,7 @@ protected:
|
|||
#ifdef ASSERT
|
||||
private:
|
||||
// Deadlock detection support for Mutex locks. List of locks own by thread.
|
||||
Monitor* _owned_locks;
|
||||
Mutex* _owned_locks;
|
||||
// Mutex::set_owner_implementation is the only place where _owned_locks is modified,
|
||||
// thus the friendship
|
||||
friend class Mutex;
|
||||
|
@ -745,7 +745,7 @@ protected:
|
|||
public:
|
||||
void print_owned_locks_on(outputStream* st) const;
|
||||
void print_owned_locks() const { print_owned_locks_on(tty); }
|
||||
Monitor* owned_locks() const { return _owned_locks; }
|
||||
Mutex* owned_locks() const { return _owned_locks; }
|
||||
bool owns_locks() const { return owned_locks() != NULL; }
|
||||
|
||||
// Deadlock detection
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue