Page MenuHomePhabricator

Move cs_main locking annotations from .cpp to .h
ClosedPublic

Authored by fpelliccioni on Sep 24 2019, 19:52.

Details

Summary

Move cs_main locking annotations from .cpp to .h.

Backport of Bitcoin Core PR14063
https://github.com/bitcoin/bitcoin/pull/14063

Test Plan

Maybe not necessary because are "aesthetic changes", but just in case:

  1. Build with Clang in Debug mode:
CXX=clang++ CC=clang cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug
ninja check
  1. Verify that the compiler has not emitted a thread-safety warning.
  2. Run the node: ./src/bitcoind -regtest
  3. Verify that text similar to "Assertion failed: lock ... not held ..." is not printed on stderr.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable