Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Add cs_main lock annotations for mapBlockIndex #15321

Merged
merged 1 commit into from Feb 6, 2019

Conversation

Projects
None yet
4 participants
@MarcoFalke
Copy link
Member

commented Feb 1, 2019

Marked as "doc" because it didn't change the bitcoind on my system with default configure settings for both gcc and clang.

@MarcoFalke MarcoFalke added Docs Refactoring and removed Docs labels Feb 1, 2019

Show resolved Hide resolved src/validation.cpp Outdated
@practicalswift

This comment has been minimized.

Copy link
Member

commented Feb 1, 2019

Concept ACK

Thanks for adding this missing annotation.

@MarcoFalke MarcoFalke force-pushed the MarcoFalke:Mf1902-docLoc branch 2 times, most recently from fa5349e to fa36350 Feb 1, 2019

@MarcoFalke MarcoFalke force-pushed the MarcoFalke:Mf1902-docLoc branch from fa36350 to fa2a69f Feb 1, 2019

@promag
Copy link
Member

left a comment

Concept ACK.

@@ -288,7 +288,7 @@ uint64_t CalculateCurrentUsage();
/**
* Mark one block file as pruned.
*/
void PruneOneBlockFile(const int fileNumber);
void PruneOneBlockFile(const int fileNumber) EXCLUSIVE_LOCKS_REQUIRED(cs_main);

This comment has been minimized.

Copy link
@promag

promag Feb 2, 2019

Member

Is this necessary?

This comment has been minimized.

Copy link
@Empact

Empact Feb 4, 2019

Member

Without it I get:

  CXX      wallet/libbitcoin_wallet_a-wallet.o
validation.cpp:3623:28: warning: reading variable 'mapBlockIndex' requires holding mutex 'cs_main' [-Wthread-safety-analysis]
    for (const auto& entry : mapBlockIndex) {
                           ^
validation.cpp:3623:28: warning: reading variable 'mapBlockIndex' requires holding mutex 'cs_main' [-Wthread-safety-analysis]
  CXX      wallet/libbitcoin_wallet_a-walletdb.o
@Empact

This comment has been minimized.

Copy link
Member

commented Feb 4, 2019

utACK fa2a69f

MarcoFalke added a commit to MarcoFalke/bitcoin that referenced this pull request Feb 6, 2019

Merge bitcoin#15321: doc: Add cs_main lock annotations for mapBlockIndex
fa2a69f doc: Add cs_main lock annotations for mapBlockIndex (practicalswift)

Pull request description:

  Marked as "doc" because it didn't change the bitcoind on my system with default configure settings for both gcc and clang.

Tree-SHA512: ba203f16c1cdc834a61c65bb5fb20bbaf7d8bff0c3a1b8ef46bc1d3669092191221e26abd7e580efab2f9bd5a992dc363251f1b68c6cd68f8204d62675868cf1

@MarcoFalke MarcoFalke merged commit fa2a69f into bitcoin:master Feb 6, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@MarcoFalke MarcoFalke deleted the MarcoFalke:Mf1902-docLoc branch Feb 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.