MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / atomicExchange

Function atomicExchange

physx/source/foundation/src/unix/PsUnixAtomic.cpp:87–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87int32_t atomicExchange(volatile int32_t* val, int32_t val2)
88{
89 int32_t newVal, oldVal;
90
91 do
92 {
93 PAUSE();
94 oldVal = *val;
95 newVal = val2;
96 } while(atomicCompareExchange(val, newVal, oldVal) != oldVal);
97
98 return oldVal;
99}
100
101} // namespace shdfnd
102} // namespace physx

Callers 5

finalizeExecuteMethod · 0.50
raycastMethod · 0.50
overlapMethod · 0.50
sweepMethod · 0.50
flushProfileEventsMethod · 0.50

Calls 1

atomicCompareExchangeFunction · 0.70

Tested by

no test coverage detected