Commit 280a777
MarcoFalke
Merge bitcoin#24235: validation: use stronger EXCLUSIVE_LOCKS_REQUIRED()
99de806 validation: use stronger EXCLUSIVE_LOCKS_REQUIRED() (Vasil Dimov)
Pull request description:
bitcoin#24103 added annotations to
denote that the callers of `CChainState::ActivateBestChain()` and
`CChainState::InvalidateBlock()` must not own `m_chainstate_mutex` at
the time of the call.
Replace the added `LOCKS_EXCLUDED()` with a stronger
`EXCLUSIVE_LOCKS_REQUIRED()`, see
https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#negative for the
difference between both.
ACKs for top commit:
hebasto:
ACK 99de806.
jonatack:
ACK 99de806. Tested with Debian clang version 13.0.1. Reproduced hebasto's results. Verified that `LoadExternalBlockFile()` needs the annotation added here.
Tree-SHA512: 59640d9ad472cdb5066ecde89cc0aff8632a351fc030f39bb43800d2c856fb1aed3576e4134212d32be161b18780f06dc5066ac71df7f7cd69e3f21f886e15421 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
600 | | - | |
| 600 | + | |
| 601 | + | |
601 | 602 | | |
602 | 603 | | |
603 | 604 | | |
| |||
639 | 640 | | |
640 | 641 | | |
641 | 642 | | |
642 | | - | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
643 | 646 | | |
644 | 647 | | |
645 | 648 | | |
| |||
657 | 660 | | |
658 | 661 | | |
659 | 662 | | |
660 | | - | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
661 | 667 | | |
662 | | - | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
663 | 672 | | |
664 | 673 | | |
665 | 674 | | |
| |||
0 commit comments