chore: add -Wthread-analysis and annotate (part 1/2) (#3502)

* enable -Wthread-analysis
* add missing annotations
* small fixes

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
This commit is contained in:
Kostas Kyrimis 2024-08-26 18:22:38 +03:00 committed by GitHub
parent 238bf3ee85
commit 839b1be82d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 163 additions and 147 deletions

View file

@ -362,13 +362,13 @@ class UniquePicksGenerator : public PicksGenerator {
};
// Helper class used to guarantee atomicity between serialization of buckets
class ThreadLocalMutex {
class ABSL_LOCKABLE ThreadLocalMutex {
public:
ThreadLocalMutex();
~ThreadLocalMutex();
void lock();
void unlock();
void lock() ABSL_EXCLUSIVE_LOCK_FUNCTION();
void unlock() ABSL_UNLOCK_FUNCTION();
private:
EngineShard* shard_;