This is needed for upcoming commit "sync.h: Make runtime lock checks
require compile-time lock checks" to pass.
This is a backport of core#19668 [2/5]
https://github.com/bitcoin/bitcoin/pull/19668/commits/3ddc150857178bfb1c854c05bf9b526777876f56
Depends on D10161