aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar herb <herb@google.com>2015-09-16 08:21:15 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-09-16 08:21:15 -0700
commit3060f3efa0d15f613eeeb25221f2b9bf728cc8aa (patch)
treefc1749d8d1278d81c1709c2885be85b5dea88175
parent3667d5bf3f6d8eea90142046202c4f61cfcd5fea (diff)
Use atomic subtract in shared mutex.
-rw-r--r--src/core/SkSharedMutex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkSharedMutex.cpp b/src/core/SkSharedMutex.cpp
index 4cf6312067..05e434c35b 100644
--- a/src/core/SkSharedMutex.cpp
+++ b/src/core/SkSharedMutex.cpp
@@ -184,7 +184,7 @@ void SkSharedMutex::releaseShared() {
ANNOTATE_RWLOCK_RELEASED(this, 0);
// Decrement the shared count.
- int32_t oldQueueCounts = fQueueCounts.fetch_add(~0U << kSharedOffset,
+ int32_t oldQueueCounts = fQueueCounts.fetch_sub(1 << kSharedOffset,
sk_memory_order_release);
// If shared count is going to zero (because the old count == 1) and there are exclusive