aboutsummaryrefslogtreecommitdiff
path: root/src/threadinterrupt.h
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2022-04-20 16:47:29 +1000
committerAnthony Towns <aj@erisian.com.au>2022-05-12 02:25:55 +1000
commit7d73f58e9cea8f4b0bc16512983898fddde3d764 (patch)
treef66b9dd960d017efd1af4a56c626e439d121890f /src/threadinterrupt.h
parent9db941d7737406b8593024ba130c3f9c186af4c6 (diff)
downloadbitcoin-7d73f58e9cea8f4b0bc16512983898fddde3d764.tar.xz
Increase threadsafety annotation coverage
Diffstat (limited to 'src/threadinterrupt.h')
-rw-r--r--src/threadinterrupt.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/threadinterrupt.h b/src/threadinterrupt.h
index cb9a5fbf8b..992016b4f6 100644
--- a/src/threadinterrupt.h
+++ b/src/threadinterrupt.h
@@ -21,11 +21,11 @@ class CThreadInterrupt
public:
CThreadInterrupt();
explicit operator bool() const;
- void operator()();
+ void operator()() EXCLUSIVE_LOCKS_REQUIRED(!mut);
void reset();
- bool sleep_for(std::chrono::milliseconds rel_time);
- bool sleep_for(std::chrono::seconds rel_time);
- bool sleep_for(std::chrono::minutes rel_time);
+ bool sleep_for(std::chrono::milliseconds rel_time) EXCLUSIVE_LOCKS_REQUIRED(!mut);
+ bool sleep_for(std::chrono::seconds rel_time) EXCLUSIVE_LOCKS_REQUIRED(!mut);
+ bool sleep_for(std::chrono::minutes rel_time) EXCLUSIVE_LOCKS_REQUIRED(!mut);
private:
std::condition_variable cond;