base: avoid wrong warning by Mutex::acquire
A _owner is only valid if lock is actually locked. Issue #3612
This commit is contained in:
parent
80ff844dc2
commit
a9caf3fbe4
|
@ -71,7 +71,9 @@ class Genode::Cancelable_lock
|
||||||
|
|
||||||
Applicant _owner;
|
Applicant _owner;
|
||||||
|
|
||||||
bool lock_owner(Applicant &myself) { return _owner == myself; }
|
bool lock_owner(Applicant &myself) {
|
||||||
|
return (_state == LOCKED) && (_owner == myself); }
|
||||||
|
|
||||||
void lock(Applicant &);
|
void lock(Applicant &);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue