diff --git a/src/system/kernel/cache/block_cache.cpp b/src/system/kernel/cache/block_cache.cpp index a207099cb8..826a71d3c9 100644 --- a/src/system/kernel/cache/block_cache.cpp +++ b/src/system/kernel/cache/block_cache.cpp @@ -283,9 +283,9 @@ static status_t write_cached_block(block_cache *cache, cached_block *block, static DoublyLinkedList sCaches; -static mutex sCachesLock; +static mutex sCachesLock = MUTEX_INITIALIZER("block caches"); static sem_id sEventSemaphore; -static mutex sNotificationsLock; +static mutex sNotificationsLock = MUTEX_INITIALIZER("block cache notifications"); static thread_id sNotifierWriterThread; static DoublyLinkedListLink sMarkCache; // TODO: this only works if the link is the first entry of block_cache @@ -1622,9 +1622,6 @@ block_cache_init(void) if (sBlockCache == NULL) return B_NO_MEMORY; - mutex_init(&sCachesLock, "block caches"); - mutex_init(&sNotificationsLock, "block cache notifications"); - new (&sCaches) DoublyLinkedList; // manually call constructor