From 35b737162a336d3cac5e79e0b4bc691a5947b202 Mon Sep 17 00:00:00 2001 From: Andrey Borodin Date: Sun, 4 Aug 2024 20:59:33 +0500 Subject: [PATCH v0 1/4] Remove unused functions in buf_internals.h --- src/include/storage/buf_internals.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h index f190e6e5e4..fd311a47a2 100644 --- a/src/include/storage/buf_internals.h +++ b/src/include/storage/buf_internals.h @@ -176,23 +176,11 @@ BufTagMatchesRelFileLocator(const BufferTag *tag, * hash code with BufTableHashCode(), then apply BufMappingPartitionLock(). * NB: NUM_BUFFER_PARTITIONS must be a power of 2! */ -static inline uint32 -BufTableHashPartition(uint32 hashcode) -{ - return hashcode % NUM_BUFFER_PARTITIONS; -} - static inline LWLock * BufMappingPartitionLock(uint32 hashcode) { return &MainLWLockArray[BUFFER_MAPPING_LWLOCK_OFFSET + - BufTableHashPartition(hashcode)].lock; -} - -static inline LWLock * -BufMappingPartitionLockByIndex(uint32 index) -{ - return &MainLWLockArray[BUFFER_MAPPING_LWLOCK_OFFSET + index].lock; + hashcode % NUM_BUFFER_PARTITIONS].lock; } /* -- 2.39.3 (Apple Git-146)