From e75de8adc6918cc16ad84d2fa32cbc185d5b7fdb Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 28 Oct 1997 14:40:31 +0000 Subject: lower the default hash size if SEMMSL isn't defined (This used to be commit 9f0be847fdbcf0f8bbd69de6cdf277ae0440bcda) --- source3/include/smb.h | 5 +---- source3/locking/locking_shm.c | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/include/smb.h b/source3/include/smb.h index d7a576de85..cdd7bcac7a 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -49,7 +49,7 @@ #ifdef SEMMSL #define SHMEM_HASH_SIZE (SEMMSL-1) #else -#define SHMEM_HASH_SIZE 113 +#define SHMEM_HASH_SIZE 15 #endif #endif @@ -1312,9 +1312,6 @@ typedef struct } share_mode_entry; -/* Conversion to hash entry index from device and inode numbers. */ -#define HASH_ENTRY(dev,ino) ((( (uint32)(dev) )* ( (uint32)(ino) )) % lp_shmem_hash_size()) - /* each implementation of the share mode code needs to support the following operations */ struct share_ops { diff --git a/source3/locking/locking_shm.c b/source3/locking/locking_shm.c index f2ae641808..3abd6b25a7 100644 --- a/source3/locking/locking_shm.c +++ b/source3/locking/locking_shm.c @@ -62,6 +62,11 @@ typedef struct static int read_only; + +/* Conversion to hash entry index from device and inode numbers. */ +#define HASH_ENTRY(dev,ino) ((( (uint32)(dev) )* ( (uint32)(ino) )) % lp_shmem_hash_size()) + + /******************************************************************* deinitialize the shared memory for share_mode management ******************************************************************/ -- cgit