diff --git a/repos/base/include/base/heap.h b/repos/base/include/base/heap.h index 54b1392bd3..feab513381 100644 --- a/repos/base/include/base/heap.h +++ b/repos/base/include/base/heap.h @@ -19,7 +19,7 @@ #include #include #include -#include +#include namespace Genode { @@ -89,7 +89,7 @@ class Genode::Heap : public Allocator ram_alloc = ram, region_map = rm; } }; - Lock mutable _lock { }; + Mutex mutable _mutex { }; Reconstructible _alloc; /* local allocator */ Dataspace_pool _ds_pool; /* list of dataspaces */ size_t _quota_limit { 0 }; @@ -157,7 +157,7 @@ class Genode::Heap : public Allocator template void for_each_region(FN const &fn) const { - Lock::Guard guard(_lock); + Mutex::Guard guard(_mutex); for (Dataspace const *ds = _ds_pool.first(); ds; ds = ds->next()) fn(ds->local_addr, ds->size); } @@ -198,7 +198,7 @@ class Genode::Sliced_heap : public Allocator Region_map &_region_map; /* region map of the address space */ size_t _consumed = 0; /* number of allocated bytes */ List _blocks { }; /* list of allocated blocks */ - Lock _lock { }; /* serialize allocations */ + Mutex _mutex { }; /* serialize allocations */ public: diff --git a/repos/base/src/lib/base/heap.cc b/repos/base/src/lib/base/heap.cc index 11bd075394..a068576ec5 100644 --- a/repos/base/src/lib/base/heap.cc +++ b/repos/base/src/lib/base/heap.cc @@ -224,7 +224,7 @@ bool Heap::alloc(size_t size, void **out_addr) error("attempt to allocate zero-size block from heap"); /* serialize access of heap functions */ - Lock::Guard lock_guard(_lock); + Mutex::Guard guard(_mutex); /* check requested allocation against quota limit */ if (size + _quota_used > _quota_limit) @@ -237,7 +237,7 @@ bool Heap::alloc(size_t size, void **out_addr) void Heap::free(void *addr, size_t) { /* serialize access of heap functions */ - Lock::Guard lock_guard(_lock); + Mutex::Guard guard(_mutex); /* try to find the size in our local allocator */ size_t const size = _alloc->size_at(addr); diff --git a/repos/base/src/lib/base/sliced_heap.cc b/repos/base/src/lib/base/sliced_heap.cc index 43483a6005..274365e942 100644 --- a/repos/base/src/lib/base/sliced_heap.cc +++ b/repos/base/src/lib/base/sliced_heap.cc @@ -65,7 +65,7 @@ bool Sliced_heap::alloc(size_t size, void **out_addr) } /* serialize access to block list */ - Lock::Guard lock_guard(_lock); + Mutex::Guard guard(_mutex); construct_at(block, ds_cap, size); @@ -85,7 +85,7 @@ void Sliced_heap::free(void *addr, size_t) void *local_addr = nullptr; { /* serialize access to block list */ - Lock::Guard lock_guard(_lock); + Mutex::Guard guard(_mutex); /* * The 'addr' argument points to the payload. We use pointer