refactor: Remove negative lock annotations from globals
Summary:
They only make sense for mutexes that are private members. Until cs_main is a private member the negative annotations should be replaced by excluded annotations, which are optional.
This is a backport of core#21598
Test Plan:
With TSAN:
$ git checkout <previous commit hash> $ ninja &> before.log $ git checkout pr21598 $ ninja &> after.log $ grep "negative capability" before.log | wc -l 33 $ grep "negative capability" after.log | wc -l 0
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D10187