Page MenuHomePhabricator

refactor: Make CAddrMan::cs non-recursive
ClosedPublic

Authored by Fabien on Oct 14 2022, 14:09.

Details

Reviewers
sdulfari
Group Reviewers
Restricted Project
Commits
rABCb8bdc0c6dd89: refactor: Make CAddrMan::cs non-recursive
Summary
This PR replaces RecursiveMutex CAddrMan::cs with Mutex CAddrMan::cs.

All of the related code branches are covered by appropriate lock assertions to insure that the mutex locking policy has not been changed by accident.

Backport of core#19238.

Depends no D12252 and D12254.

Test Plan

With Debug and Clang:

ninja all check-all

Run the TSAN build.

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Oct 14 2022, 14:09
sdulfari added a subscriber: sdulfari.
sdulfari added inline comments.
src/addrman.h
508 ↗(On Diff #35703)

Nit: undo moving the comment

This revision is now accepted and ready to land.Oct 14 2022, 17:17
src/addrman.h
508 ↗(On Diff #35703)

Good catch