Page MenuHomePhabricator

refactor: Replace RecursiveMutex with Mutex in warnings.cpp
ClosedPublic

Authored by PiRK on Mar 9 2021, 15:42.

Details

Summary

The functions that could lock this mutex, i.e., SetMiscWarning(), {S,G}etfLargeWorkForkFound(), SetfLargeWorkInvalidChainFound(), GetWarnings(), do not call itself recursively, and do not call each other either directly or indirectly. Therefore, the g_warnings_mutex could be a non-recursive mutex.

This is a backport of core#19220

Test Plan
CC=clang CXX=clang++ cmake .. -DENABLE_SANITIZERS=thread -GNinja
ninja all check check-functional

Diff Detail

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