Commit 61e0e4d9 authored by Kevin McCray's avatar Kevin McCray Committed by Facebook Github Bot 5

folly: avoid using atomic operations android can't handle

Summary:On Android, clang 3.8 + libstdc++ doesn't support the full
range of atomic operations.  This diff fixes up the ones we
ran into when building fb4a.

Reviewed By: mzlee

Differential Revision: D3092352

fb-gh-sync-id: 7fea8513e23425fc37050ad14d82aabaceb00352
shipit-source-id: 7fea8513e23425fc37050ad14d82aabaceb00352
parent 7ea8b939
...@@ -76,7 +76,7 @@ class TLRefCount { ...@@ -76,7 +76,7 @@ class TLRefCount {
assert(state_.load() == State::GLOBAL); assert(state_.load() == State::GLOBAL);
return --globalCount_; return globalCount_-- - 1;
} }
Int operator*() const { Int operator*() const {
...@@ -132,7 +132,7 @@ class TLRefCount { ...@@ -132,7 +132,7 @@ class TLRefCount {
} }
collectCount_ = count_; collectCount_ = count_;
refCount_.globalCount_ += collectCount_; refCount_.globalCount_.fetch_add(collectCount_);
collectGuard_.reset(); collectGuard_.reset();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment