Page MenuHomePhabricator

refactor: replace RecursiveMutex cs_SubVer with Mutex (and rename)
ClosedPublic

Authored by PiRK on Mar 17 2023, 16:00.

Details

Summary

scripted-diff: rename cs_SubVer -> m_subver_mutex

-BEGIN VERIFY SCRIPT-
sed -i 's/cs_SubVer/m_subver_mutex/g' ./src/net.h ./src/net.cpp ./src/net_processing.cpp
-END VERIFY SCRIPT-

refactor: replace RecursiveMutex m_subver_mutex with Mutex

In each of the critical sections, only the the guarded variable is
accessed, without any chance that within one section another one is
called. Hence, we can use an ordinary Mutex instead of RecursiveMutex.

This is a backport of core#24079

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