HomePhabricator

More thread safety annotation coverage

Description

More thread safety annotation coverage

Summary:

  • rpc/blockchain.cpp: Remove g_utxosetscan mutex that is only protecting a single atomic variable
  • wallet/wallet.h: Remove mutexScanning which was only protecting a single atomic bool
  • net: fMsgProcWake use LOCK instead of lock_guard
  • rpc/blockchain.cpp: thread safety annotations for latestblock
  • test/checkqueue_tests: thread safety annotations
  • util/system.cpp: add thread safety annotations for dir_locks
  • logging: thread safety annotations

Adds LockGuard helper in threadsafety.h to replace lock_guard<mutex>
when LOCK(Mutex) isn't available for use.

This is a backport of Core PR16127

Test Plan:

ninja all check

Using clang

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D7523

Details

Provenance
Anthony Towns <aj@erisian.com.au>Authored on Feb 11 2020, 04:54
deadalnixCommitted on Sep 23 2020, 13:04
deadalnixPushed on Sep 23 2020, 13:04
Reviewer
Restricted Project
Differential Revision
D7523: More thread safety annotation coverage
Parents
rABC131a31b642fa: [fix] only use horizontalAdvance for Qt versions which support it
Branches
Unknown
Tags
Unknown