From 72162cc730a3552d6d5e18187d1555b1d7a73fd1 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 28 Jan 2025 17:55:27 -0500 Subject: [PATCH] kernel/vm: Put name argument first in VMCache::Init. This seems to make more logical sense. --- headers/private/kernel/vm/VMCache.h | 4 ++-- src/system/kernel/vm/VMAnonymousCache.cpp | 2 +- src/system/kernel/vm/VMAnonymousNoSwapCache.cpp | 2 +- src/system/kernel/vm/VMCache.cpp | 2 +- src/system/kernel/vm/VMDeviceCache.cpp | 2 +- src/system/kernel/vm/VMNullCache.cpp | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/headers/private/kernel/vm/VMCache.h b/headers/private/kernel/vm/VMCache.h index 0526ee608d..7e1ec7b1a8 100644 --- a/headers/private/kernel/vm/VMCache.h +++ b/headers/private/kernel/vm/VMCache.h @@ -81,8 +81,8 @@ public: VMCache(); virtual ~VMCache(); - status_t Init(uint32 cacheType, uint32 allocationFlags, - const char* name); + status_t Init(const char* name, uint32 cacheType, + uint32 allocationFlags); virtual void Delete(); diff --git a/src/system/kernel/vm/VMAnonymousCache.cpp b/src/system/kernel/vm/VMAnonymousCache.cpp index 4b579b1622..f667c84c38 100644 --- a/src/system/kernel/vm/VMAnonymousCache.cpp +++ b/src/system/kernel/vm/VMAnonymousCache.cpp @@ -463,7 +463,7 @@ VMAnonymousCache::Init(bool canOvercommit, int32 numPrecommittedPages, ")\n", this, canOvercommit ? "yes" : "no", numPrecommittedPages, numGuardPages); - status_t error = VMCache::Init(CACHE_TYPE_RAM, allocationFlags, "VMAnonymousCache"); + status_t error = VMCache::Init("VMAnonymousCache", CACHE_TYPE_RAM, allocationFlags); if (error != B_OK) return error; diff --git a/src/system/kernel/vm/VMAnonymousNoSwapCache.cpp b/src/system/kernel/vm/VMAnonymousNoSwapCache.cpp index b2b82fb378..557c774710 100644 --- a/src/system/kernel/vm/VMAnonymousNoSwapCache.cpp +++ b/src/system/kernel/vm/VMAnonymousNoSwapCache.cpp @@ -45,7 +45,7 @@ VMAnonymousNoSwapCache::Init(bool canOvercommit, int32 numPrecommittedPages, TRACE(("VMAnonymousNoSwapCache::Init(canOvercommit = %s, numGuardPages = %ld) " "at %p\n", canOvercommit ? "yes" : "no", numGuardPages, store)); - status_t error = VMCache::Init(CACHE_TYPE_RAM, allocationFlags, "VMAnonymousNoSwapCache"); + status_t error = VMCache::Init("VMAnonymousNoSwapCache", CACHE_TYPE_RAM, allocationFlags); if (error != B_OK) return error; diff --git a/src/system/kernel/vm/VMCache.cpp b/src/system/kernel/vm/VMCache.cpp index 8485bd15b5..ddbee8b688 100644 --- a/src/system/kernel/vm/VMCache.cpp +++ b/src/system/kernel/vm/VMCache.cpp @@ -630,7 +630,7 @@ VMCache::~VMCache() status_t -VMCache::Init(uint32 cacheType, uint32 allocationFlags, const char* name) +VMCache::Init(const char* name, uint32 cacheType, uint32 allocationFlags) { mutex_init(&fLock, name); diff --git a/src/system/kernel/vm/VMDeviceCache.cpp b/src/system/kernel/vm/VMDeviceCache.cpp index 0ecbe8e571..3dd71bea72 100644 --- a/src/system/kernel/vm/VMDeviceCache.cpp +++ b/src/system/kernel/vm/VMDeviceCache.cpp @@ -16,7 +16,7 @@ status_t VMDeviceCache::Init(addr_t baseAddress, uint32 allocationFlags) { fBaseAddress = baseAddress; - return VMCache::Init(CACHE_TYPE_DEVICE, allocationFlags, "VMDeviceCache"); + return VMCache::Init("VMDeviceCache", CACHE_TYPE_DEVICE, allocationFlags); } diff --git a/src/system/kernel/vm/VMNullCache.cpp b/src/system/kernel/vm/VMNullCache.cpp index f106285c61..01ab3cd538 100644 --- a/src/system/kernel/vm/VMNullCache.cpp +++ b/src/system/kernel/vm/VMNullCache.cpp @@ -12,7 +12,7 @@ status_t VMNullCache::Init(uint32 allocationFlags) { - return VMCache::Init(CACHE_TYPE_NULL, allocationFlags, "VMNullCache"); + return VMCache::Init("VMNullCache", CACHE_TYPE_NULL, allocationFlags); }