File tree Expand file tree Collapse file tree 2 files changed +0
-33
lines changed Expand file tree Collapse file tree 2 files changed +0
-33
lines changed Original file line number Diff line number Diff line change @@ -793,25 +793,6 @@ bool ChainstateManager::ProcessNewBlock(...)
793
793
}
794
794
```
795
795
796
- - When Clang Thread Safety Analysis is unable to determine if a mutex is locked, use `LockAssertion` class instances:
797
-
798
- ```C++
799
- // net_processing.h
800
- void RelayTransaction(...) EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
801
-
802
- // net_processing.cpp
803
- void RelayTransaction(...)
804
- {
805
- AssertLockHeld(::cs_main);
806
-
807
- connman.ForEachNode([&txid, &wtxid](CNode* pnode) {
808
- LockAssertion lock(::cs_main);
809
- ...
810
- });
811
- }
812
-
813
- ```
814
-
815
796
- Build and run tests with `-DDEBUG_LOCKORDER` to verify that no potential
816
797
deadlocks are introduced. As of 0.12, this is defined by default when
817
798
configuring with `--enable-debug`.
Original file line number Diff line number Diff line change @@ -352,18 +352,4 @@ class CSemaphoreGrant
352
352
}
353
353
};
354
354
355
- // Utility class for indicating to compiler thread analysis that a mutex is
356
- // locked (when it couldn't be determined otherwise).
357
- struct SCOPED_LOCKABLE LockAssertion
358
- {
359
- template <typename Mutex>
360
- explicit LockAssertion (Mutex& mutex) EXCLUSIVE_LOCK_FUNCTION(mutex)
361
- {
362
- #ifdef DEBUG_LOCKORDER
363
- AssertLockHeld (mutex);
364
- #endif
365
- }
366
- ~LockAssertion () UNLOCK_FUNCTION() {}
367
- };
368
-
369
355
#endif // BITCOIN_SYNC_H
You can’t perform that action at this time.
0 commit comments