Changeset 74453 in vbox for trunk/include/iprt
- Timestamp:
- Sep 25, 2018 11:15:13 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asm.h
r73502 r74453 527 527 528 528 /** 529 * Atomically Exchange a size_t value, ordered. 530 * 531 * @returns Current *ppv value 532 * @param ppv Pointer to the pointer variable to update. 533 * @param pv The pointer value to assign to *ppv. 534 */ 535 DECLINLINE(size_t) ASMAtomicXchgZ(size_t volatile RT_FAR *puValue, const size_t uValue) 536 { 537 #if ARCH_BITS == 16 538 AssertCompile(sizeof(size_t) == 2); 539 return ASMAtomicXchgU16((volatile uint16_t RT_FAR *)puValue, uValue); 540 #elif ARCH_BITS == 32 541 return ASMAtomicXchgU32((volatile uint32_t RT_FAR *)puValue, uValue); 542 #elif ARCH_BITS == 64 543 return ASMAtomicXchgU64((volatile uint64_t RT_FAR *)puValue, uValue); 544 #else 545 # error "ARCH_BITS is bogus" 546 #endif 547 } 548 549 550 /** 529 551 * Atomically Exchange a pointer value, ordered. 530 552 *
Note:
See TracChangeset
for help on using the changeset viewer.