Index: src/core/SkSharedMutex.cpp |
diff --git a/src/core/SkSharedMutex.cpp b/src/core/SkSharedMutex.cpp |
index 3815ec3f2805162e165e744396313e0f15e19016..b9af10a2beb368e9564159bc2dfe1a1b4f4d163e 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 |