Changeset 101966 in vbox for trunk/src/libs/xpcom18a4/ipc/ipcd/extensions
- Timestamp:
- Nov 8, 2023 12:30:30 PM (18 months ago)
- svn:sync-xref-src-repo-rev:
- 160063
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp
r101927 r101966 55 55 # include <map> 56 56 # include <list> 57 # include <iprt/asm.h> 57 58 # include <iprt/err.h> 58 59 # include <iprt/req.h> … … 254 255 NS_PRECONDITION(PRInt32(mRefCnt) >= 0, "illegal refcnt"); 255 256 nsrefcnt count; 256 count = PR_AtomicIncrement((PRInt32*)&mRefCnt);257 count = ASMAtomicIncU32((volatile uint32_t *)&mRefCnt); 257 258 return count; 258 259 } … … 262 263 nsrefcnt count; 263 264 NS_PRECONDITION(0 != mRefCnt, "dup release"); 264 count = PR_AtomicDecrement((PRInt32*)&mRefCnt);265 count = ASMAtomicDecU32((volatile uint32_t *)&mRefCnt); 265 266 if (0 == count) { 266 267 NS_PRECONDITION(PRInt32(mRefCntIPC) == 0, "non-zero IPC refcnt"); … … 278 279 { 279 280 NS_PRECONDITION(PRInt32(mRefCntIPC) >= 0, "illegal refcnt"); 280 nsrefcnt count = PR_AtomicIncrement((PRInt32*)&mRefCntIPC);281 nsrefcnt count = ASMAtomicIncU32((volatile uint32_t *)&mRefCntIPC); 281 282 return count; 282 283 } … … 287 288 { 288 289 NS_PRECONDITION(0 != mRefCntIPC, "dup release"); 289 nsrefcnt count = PR_AtomicDecrement((PRInt32*)&mRefCntIPC);290 nsrefcnt count = ASMAtomicDecU32((volatile uint32_t *)&mRefCntIPC); 290 291 if (0 == count) { 291 292 // If the last IPC reference is released, remove this instance from the map. … … 1268 1269 NewRequestIndex() 1269 1270 { 1270 static PRInt32 sRequestIndex;1271 return (PRUint32) PR_AtomicIncrement(&sRequestIndex);1271 static volatile uint32_t sRequestIndex = 0; 1272 return ASMAtomicIncU32(&sRequestIndex); 1272 1273 } 1273 1274 … … 2255 2256 { 2256 2257 nsrefcnt count; 2257 count = PR_AtomicIncrement((PRInt32*)&mRefCnt);2258 count = ASMAtomicIncU32((volatile uint32_t *)&mRefCnt); 2258 2259 NS_LOG_ADDREF(this, count, "DConnectStub", sizeof(*this)); 2259 2260 return count; … … 2276 2277 nsAutoLock stubLock (dConnect->StubLock()); 2277 2278 2278 count = PR_AtomicDecrement((PRInt32*)&mRefCnt);2279 count = ASMAtomicDecU32((volatile uint32_t *)&mRefCnt); 2279 2280 NS_LOG_RELEASE(this, count, "DConnectStub"); 2280 2281 … … 2335 2336 else 2336 2337 { 2337 count = PR_AtomicDecrement((PRInt32*)&mRefCnt);2338 count = ASMAtomicDecU32((volatile uint32_t *)&mRefCnt); 2338 2339 NS_LOG_RELEASE(this, count, "DConnectStub"); 2339 2340 }
Note:
See TracChangeset
for help on using the changeset viewer.