diff options
author | 2015-09-16 08:21:15 -0700 | |
---|---|---|
committer | 2015-09-16 08:21:15 -0700 | |
commit | 3060f3efa0d15f613eeeb25221f2b9bf728cc8aa (patch) | |
tree | fc1749d8d1278d81c1709c2885be85b5dea88175 | |
parent | 3667d5bf3f6d8eea90142046202c4f61cfcd5fea (diff) |
Use atomic subtract in shared mutex.
BUG=skia:
Review URL: https://codereview.chromium.org/1348173003
-rw-r--r-- | src/core/SkSharedMutex.cpp | 2 |
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 |