Merge #13126: util: Add Clang thread safety annotations for variables guarded by cs_args
Summary:
1e29379d69 Fix potential deadlock (practicalswift)
d58dc9f943 Add lock annotations (cs_args) (practicalswift)
db5e9d3c88 Add missing locks (cs_args) (practicalswift)
Pull request description:
- Add missing cs_args locks
- Add Clang thread safety annotations for variables guarded by cs_args
Tree-SHA512: bc562dbddf24a287bcf9bf902bc930f942f260a94e5c8ec4d190f7f2ddac448ed3d52acadaf9fc1c81a5cbff2c171c52c18ba0804eeb03f699d70394e1c977c5
Backport of Core PR13126
https://github.com/bitcoin/bitcoin/pull/13126/
Completes T652
Test Plan:
cmake -GNinja .. -DENABLE_WERROR=ON ninja check
Also run build-werror and build-tsan builds.
Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc, markblundeberg
Reviewed By: jasonbcox, O1 Bitcoin ABC, #bitcoin_abc
Subscribers: markblundeberg
Differential Revision: https://reviews.bitcoinabc.org/D4965