doc: Add cs_main lock annotations for mapBlockIndex #15321
pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1902-docLoc changing 3 files +6 −3-
MarcoFalke commented at 8:05 pm on February 1, 2019: memberMarked as “doc” because it didn’t change the bitcoind on my system with default configure settings for both gcc and clang.
-
MarcoFalke added the label Docs on Feb 1, 2019
-
MarcoFalke added the label Refactoring on Feb 1, 2019
-
MarcoFalke removed the label Docs on Feb 1, 2019
-
in src/validation.cpp:3619 in fabc580e41 outdated
3615@@ -3616,7 +3616,7 @@ uint64_t CalculateCurrentUsage() 3616 } 3617 3618 /* Prune a block file (modify associated database entries)*/ 3619-void PruneOneBlockFile(const int fileNumber) 3620+void PruneOneBlockFile(const int fileNumber) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
practicalswift commented at 8:16 pm on February 1, 2019:Shouldn’t this annotation be insrc/validation.h
instead?practicalswift commented at 8:16 pm on February 1, 2019: contributorConcept ACK
Thanks for adding this missing annotation.
MarcoFalke force-pushed on Feb 1, 2019MarcoFalke force-pushed on Feb 1, 2019doc: Add cs_main lock annotations for mapBlockIndex fa2a69fcb9MarcoFalke force-pushed on Feb 1, 2019promag commented at 1:31 am on February 2, 2019: memberConcept ACK.in src/validation.h:291 in fa2a69fcb9
287@@ -288,7 +288,7 @@ uint64_t CalculateCurrentUsage(); 288 /** 289 * Mark one block file as pruned. 290 */ 291-void PruneOneBlockFile(const int fileNumber); 292+void PruneOneBlockFile(const int fileNumber) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
promag commented at 1:32 am on February 2, 2019:Is this necessary?
Empact commented at 7:45 am on February 4, 2019:Without it I get:
0 CXX wallet/libbitcoin_wallet_a-wallet.o 1validation.cpp:3623:28: warning: reading variable 'mapBlockIndex' requires holding mutex 'cs_main' [-Wthread-safety-analysis] 2 for (const auto& entry : mapBlockIndex) { 3 ^ 4validation.cpp:3623:28: warning: reading variable 'mapBlockIndex' requires holding mutex 'cs_main' [-Wthread-safety-analysis] 5 CXX wallet/libbitcoin_wallet_a-walletdb.o
Empact commented at 7:47 am on February 4, 2019: memberMarcoFalke referenced this in commit 5cdb82111c on Feb 6, 2019MarcoFalke merged this on Feb 6, 2019MarcoFalke closed this on Feb 6, 2019
MarcoFalke deleted the branch on Feb 6, 2019deadalnix referenced this in commit 07d651060a on Mar 26, 2020LarryRuane referenced this in commit 3a318e2886 on Apr 29, 2021LarryRuane referenced this in commit 48b5161d99 on Jun 1, 2021Munkybooty referenced this in commit 8fa36b45df on Aug 23, 2021DrahtBot locked this on Dec 16, 2021
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 09:12 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 09:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me