base: remove Cancelable_lock

- base/cancelable_lock.h becomes base/lock.h
- all members become private within base/lock.h
- solely Mutex and Blockade are friends to use base/lock.h

Fixes #3819
This commit is contained in:
Alexander Boettcher
2020-07-14 10:15:30 +02:00
committed by Christian Helmuth
parent 0ed7367c97
commit 41380ff769
23 changed files with 108 additions and 209 deletions

View File

@ -15,18 +15,18 @@
#include <base/mutex.h>
#include <hw/assert.h>
Genode::Cancelable_lock::Cancelable_lock(Genode::Cancelable_lock::State state)
Genode::Lock::Lock(Genode::Lock::State state)
: _state(state), _owner(nullptr) { }
void Genode::Cancelable_lock::unlock()
void Genode::Lock::unlock()
{
assert(_state == LOCKED);
_state = UNLOCKED;
}
void Genode::Cancelable_lock::lock()
void Genode::Lock::lock()
{
assert(_state == UNLOCKED);
_state = LOCKED;