* 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(). */
| 624 | * We use this just to avoid redundant calls of LockTagHashCode(). |
| 625 | */ |
| 626 | static inline uint32 |
| 627 | ProcLockHashCode(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 | } |
| 640 | extern bool DoLockModesConflict(LOCKMODE mode1, LOCKMODE mode2); |
| 641 | extern LockAcquireResult LockAcquire(const LOCKTAG *locktag, |
| 642 | LOCKMODE lockmode, |
no outgoing calls
no test coverage detected