aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkSharedMutex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkSharedMutex.cpp')
-rw-r--r--src/core/SkSharedMutex.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/SkSharedMutex.cpp b/src/core/SkSharedMutex.cpp
index 3815ec3f28..b9af10a2be 100644
--- a/src/core/SkSharedMutex.cpp
+++ b/src/core/SkSharedMutex.cpp
@@ -11,7 +11,6 @@
#include "SkSemaphore.h"
#include "SkTypes.h"
-
#if defined(THREAD_SANITIZER)
/* Report that a lock has been created at address "lock". */
@@ -168,7 +167,7 @@ void SkSharedMutex::releaseShared() {
ANNOTATE_RWLOCK_RELEASED(this, 0);
// Decrement the shared count.
- int32_t oldQueueCounts = fQueueCounts.fetch_add(-1 << kSharedOffset,
+ int32_t oldQueueCounts = fQueueCounts.fetch_add(~0U << kSharedOffset,
sk_memory_order_release);
// If shared count is going to zero (because the old count == 1) and there are exclusive