File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ PcpMapExpression::_Node::New( _Op op_,
238238 // Check for existing instance to re-use
239239 _NodeMap::accessor accessor;
240240 if (_nodeRegistry->map .insert (accessor, key) ||
241- accessor->second ->_refCount .fetch_and_increment ( ) == 0 ) {
241+ accessor->second ->_refCount .fetch_add ( 1 ) == 0 ) {
242242 // Either there was no node in the table, or there was but it had
243243 // begun dying (another client dropped its refcount to 0). We have
244244 // to create a new node in the table. When the client that is
@@ -388,7 +388,7 @@ TfDelegatedCountIncrement(PcpMapExpression::_Node* p)
388388void
389389TfDelegatedCountDecrement (PcpMapExpression::_Node* p) noexcept
390390{
391- if (p->_refCount .fetch_and_decrement ( ) == 1 )
391+ if (p->_refCount .fetch_sub ( 1 ) == 1 )
392392 delete p;
393393}
394394
Original file line number Diff line number Diff line change 3030
3131#include " pxr/base/tf/delegatedCountPtr.h"
3232
33- #include < tbb/atomic.h>
3433#include < tbb/spin_mutex.h>
3534
3635#include < atomic>
@@ -269,7 +268,7 @@ class PcpMapExpression
269268 struct _NodeMap ;
270269 static TfStaticData<_NodeMap> _nodeRegistry;
271270
272- mutable tbb ::atomic<int > _refCount;
271+ mutable std ::atomic<int > _refCount;
273272 mutable Value _cachedValue;
274273 mutable std::set<_Node*> _dependentExpressions;
275274 Value _valueForVariable;
Original file line number Diff line number Diff line change 194194#include < boost/unordered_map.hpp>
195195#include < boost/utility.hpp>
196196#include < boost/utility/enable_if.hpp>
197- #include < tbb/atomic.h>
198197#include < tbb/blocked_range.h>
199198#include < tbb/cache_aligned_allocator.h>
200199#include < tbb/concurrent_hash_map.h>
You can’t perform that action at this time.
0 commit comments