base: avoid wrong warning by Mutex::acquire

A _owner is only valid if lock is actually locked.

Issue #3612
This commit is contained in:
Alexander Boettcher 2020-02-20 15:14:48 +01:00 committed by Christian Helmuth
parent 80ff844dc2
commit a9caf3fbe4
1 changed files with 3 additions and 1 deletions

View File

@ -71,7 +71,9 @@ class Genode::Cancelable_lock
Applicant _owner;
bool lock_owner(Applicant &myself) { return _owner == myself; }
bool lock_owner(Applicant &myself) {
return (_state == LOCKED) && (_owner == myself); }
void lock(Applicant &);
public: