Skip to content

Commit

Permalink
Use SRWLOCK_INIT instead of InitializeSRWLock().
Browse files Browse the repository at this point in the history
Fixes #323.

Change-Id: Id0e0db1506f0f5535ba1b72c3fa714c2c34428ce
Reviewed-on: https://code-review.googlesource.com/c/re2/+/59210
Reviewed-by: Paul Wankadia <[email protected]>
  • Loading branch information
junyer committed Aug 27, 2021
1 parent a6b90a2 commit 7272283
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Mutex {

#if defined(MUTEX_IS_WIN32_SRWLOCK)

Mutex::Mutex() { InitializeSRWLock(&mutex_); }
Mutex::Mutex() : mutex_(SRWLOCK_INIT) { }
Mutex::~Mutex() { }
void Mutex::Lock() { AcquireSRWLockExclusive(&mutex_); }
void Mutex::Unlock() { ReleaseSRWLockExclusive(&mutex_); }
Expand Down

0 comments on commit 7272283

Please sign in to comment.