- Timestamp:
- Sep 25, 2018 11:15:13 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 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 * -
trunk/src/VBox/Devices/Serial/DrvChar.cpp
r74447 r74453 212 212 { 213 213 size_t cbOld = 0; 214 ASMAtomicXchgSizeCorrect(&pThis->cbRemaining, 0, &cbOld);214 cbOld = ASMAtomicXchgZ(&pThis->cbRemaining, 0); 215 215 if (cbOld) /* Kick the I/O thread to fetch new data. */ 216 216 rc = pThis->pDrvStream->pfnPollInterrupt(pThis->pDrvStream); … … 218 218 219 219 LogFlowFunc(("-> %Rrc\n", rc)); 220 return VINF_SUCCESS; 220 return VINF_SUCCESS; /** @todo r=bird: return rc? */ 221 221 } 222 222
Note:
See TracChangeset
for help on using the changeset viewer.