mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Increase threadsafety annotation coverage
This commit is contained in:
parent
9db941d773
commit
7d73f58e9c
12 changed files with 101 additions and 86 deletions
|
|
@ -374,7 +374,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
void AddEvent(uint32_t event_info) noexcept
|
||||
void AddEvent(uint32_t event_info) noexcept EXCLUSIVE_LOCKS_REQUIRED(!m_events_mutex)
|
||||
{
|
||||
LOCK(m_events_mutex);
|
||||
|
||||
|
|
@ -388,7 +388,7 @@ public:
|
|||
/**
|
||||
* Feed (the hash of) all events added through AddEvent() to hasher.
|
||||
*/
|
||||
void SeedEvents(CSHA512& hasher) noexcept
|
||||
void SeedEvents(CSHA512& hasher) noexcept EXCLUSIVE_LOCKS_REQUIRED(!m_events_mutex)
|
||||
{
|
||||
// We use only SHA256 for the events hashing to get the ASM speedups we have for SHA256,
|
||||
// since we want it to be fast as network peers may be able to trigger it repeatedly.
|
||||
|
|
@ -407,7 +407,7 @@ public:
|
|||
*
|
||||
* If this function has never been called with strong_seed = true, false is returned.
|
||||
*/
|
||||
bool MixExtract(unsigned char* out, size_t num, CSHA512&& hasher, bool strong_seed) noexcept
|
||||
bool MixExtract(unsigned char* out, size_t num, CSHA512&& hasher, bool strong_seed) noexcept EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
|
||||
{
|
||||
assert(num <= 32);
|
||||
unsigned char buf[64];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue