Skip to content

Commit 7f97a12

Browse files
committed
Switch to the new LWLock API.
1 parent 564083d commit 7f97a12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/raftable/state.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ void state_shmem_request()
254254
info.dsize = info.max_dsize = hash_select_dirsize(RAFTABLE_HASH_SIZE);
255255
flags = HASH_SHARED_MEM | HASH_ALLOC | HASH_DIRSIZE | HASH_ELEM;
256256
RequestAddinShmemSpace(RAFTABLE_BLOCK_MEM + sizeof(State) + hash_get_shared_size(&info, flags));
257-
RequestAddinLWLocks(1);
257+
RequestNamedLWLockTranche("raftable", 1);
258258
}
259259

260260
StateP state_shmem_init()
@@ -274,7 +274,7 @@ StateP state_shmem_init()
274274
);
275275
Assert(state);
276276

277-
state->lock = LWLockAssign();
277+
state->lock = (LWLock*)GetNamedLWLockTranche("raftable");
278278

279279
state->hashtable = ShmemInitHash(
280280
"raftable_hashtable",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy