Page MenuHomePhabricator

Replace RecursiveMutex cs_mapLocalHost with Mutex, and rename it
ClosedPublic

Authored by PiRK on Apr 3 2023, 13:23.

Details

Summary

scripted-diff: rename cs_mapLocalHost -> g_maplocalhost_mutex

-BEGIN VERIFY SCRIPT-
s() { sed -i 's/cs_mapLocalHost/g_maplocalhost_mutex/g' $1; }
s src/net.cpp
s src/net.h
s src/rpc/net.cpp
s src/test/net_tests.cpp
-END VERIFY SCRIPT-

Within all critical sections that are protected by g_maplocalhost_mutex, there is no chance another one is called, i.e. a regular Mutex is sufficient.

This is a backport of core#24099

Test Plan

With Debug and TSAN

ninja all check check-functional

Diff Detail

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