mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-13 04:38:20 +00:00
Remove base/lock_guard.h
For Genode API users, the 'Mutex::Guard' is the way to go. Special lock implementations can bring their own 'Guard' utilities. Fixes #4769
This commit is contained in:
committed by
Christian Helmuth
parent
356506a67a
commit
6d25ffc70b
@ -106,7 +106,7 @@ uint8_t Cap_index::dec()
|
||||
|
||||
Cap_index* Capability_map::find(Cap_index::id_t id)
|
||||
{
|
||||
Lock_guard<Spin_lock> guard(_lock);
|
||||
Spin_lock::Guard guard(_lock);
|
||||
|
||||
return _tree.first() ? _tree.first()->find_by_id(id) : 0;
|
||||
}
|
||||
@ -114,7 +114,7 @@ Cap_index* Capability_map::find(Cap_index::id_t id)
|
||||
|
||||
Cap_index* Capability_map::insert(Cap_index::id_t id)
|
||||
{
|
||||
Lock_guard<Spin_lock> guard(_lock);
|
||||
Spin_lock::Guard guard(_lock);
|
||||
|
||||
ASSERT(!_tree.first() || !_tree.first()->find_by_id(id),
|
||||
"Double insertion in cap_map()!");
|
||||
@ -130,7 +130,7 @@ Cap_index* Capability_map::insert(Cap_index::id_t id)
|
||||
|
||||
Cap_index* Capability_map::insert(Cap_index::id_t id, addr_t kcap)
|
||||
{
|
||||
Lock_guard<Spin_lock> guard(_lock);
|
||||
Spin_lock::Guard guard(_lock);
|
||||
|
||||
/* remove potentially existent entry */
|
||||
Cap_index *i = _tree.first() ? _tree.first()->find_by_id(id) : 0;
|
||||
@ -150,7 +150,7 @@ Cap_index* Capability_map::insert_map(Cap_index::id_t id, addr_t kcap)
|
||||
{
|
||||
using namespace Foc;
|
||||
|
||||
Lock_guard<Spin_lock> guard(_lock);
|
||||
Spin_lock::Guard guard(_lock);
|
||||
|
||||
/* check whether capability id exists */
|
||||
Cap_index *i = _tree.first() ? _tree.first()->find_by_id(id) : 0;
|
||||
|
@ -20,7 +20,7 @@ using namespace Genode;
|
||||
|
||||
void Capability_map::remove(Genode::Cap_index* i)
|
||||
{
|
||||
Lock_guard<Spin_lock> guard(_lock);
|
||||
Spin_lock::Guard guard(_lock);
|
||||
|
||||
if (i) {
|
||||
Cap_index *e = _tree.first() ? _tree.first()->find_by_id(i->id()) : 0;
|
||||
|
Reference in New Issue
Block a user