MCPcopy Create free account
hub / github.com/apache/cloudberry / ProcLockHashCode

Function ProcLockHashCode

src/include/storage/lock.h:626–639  ·  view source on GitHub ↗

* Compute the hash code associated with a PROCLOCKTAG, given the hashcode * for its underlying LOCK. * * We use this just to avoid redundant calls of LockTagHashCode(). */

Source from the content-addressed store, hash-verified

624 * We use this just to avoid redundant calls of LockTagHashCode().
625 */
626static inline uint32
627ProcLockHashCode(const PROCLOCKTAG *proclocktag, uint32 hashcode)
628{
629 uint32 lockhash = hashcode;
630 Datum procptr;
631
632 /*
633 * This must match proclock_hash()!
634 */
635 procptr = PointerGetDatum(proclocktag->myProc);
636 lockhash ^= ((uint32) procptr) << LOG2_NUM_LOCK_PARTITIONS;
637
638 return lockhash;
639}
640extern bool DoLockModesConflict(LOCKMODE mode1, LOCKMODE mode2);
641extern LockAcquireResult LockAcquire(const LOCKTAG *locktag,
642 LOCKMODE lockmode,

Callers 8

ResLockAcquireFunction · 0.85
ResCleanUpLockFunction · 0.85
LockAcquireExtendedFunction · 0.85
SetupLockInTableFunction · 0.85
CleanUpLockFunction · 0.85
LockRefindAndReleaseFunction · 0.85
lock_twophase_recoverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected