Changeset 55954 in vbox
- Timestamp:
- May 19, 2015 11:59:57 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/include/VBox/intnetinline.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/intnetinline.h
r46904 r55954 424 424 if (offNew >= pRingBuf->offEnd) 425 425 offNew = pRingBuf->offStart; 426 if (RT_ UNLIKELY(!ASMAtomicCmpXchgU32(&pRingBuf->offWriteInt, offNew, offWriteInt)))427 return VERR_WRONG_ORDER; /* race */426 if (RT_LIKELY(ASMAtomicCmpXchgU32(&pRingBuf->offWriteInt, offNew, offWriteInt))) 427 { /* likely */ } else return VERR_WRONG_ORDER; /* race */ 428 428 Log2(("intnetRingAllocateFrameInternal: offWriteInt: %#x -> %#x (1) (R=%#x T=%#x S=%#x)\n", offWriteInt, offNew, offRead, u8Type, cbFrame)); 429 429 … … 445 445 { 446 446 uint32_t offNew = pRingBuf->offStart + cb; 447 if (RT_ UNLIKELY(!ASMAtomicCmpXchgU32(&pRingBuf->offWriteInt, offNew, offWriteInt)))448 return VERR_WRONG_ORDER; /* race */447 if (RT_LIKELY(ASMAtomicCmpXchgU32(&pRingBuf->offWriteInt, offNew, offWriteInt))) 448 { /* likely */ } else return VERR_WRONG_ORDER; /* race */ 449 449 Log2(("intnetRingAllocateFrameInternal: offWriteInt: %#x -> %#x (2) (R=%#x T=%#x S=%#x)\n", offWriteInt, offNew, offRead, u8Type, cbFrame)); 450 450 … … 465 465 { 466 466 uint32_t offNew = offWriteInt + cb + sizeof(INTNETHDR); 467 if (RT_ UNLIKELY(!ASMAtomicCmpXchgU32(&pRingBuf->offWriteInt, offNew, offWriteInt)))468 return VERR_WRONG_ORDER; /* race */467 if (RT_LIKELY(ASMAtomicCmpXchgU32(&pRingBuf->offWriteInt, offNew, offWriteInt))) 468 { /* likely */ } else return VERR_WRONG_ORDER; /* race */ 469 469 Log2(("intnetRingAllocateFrameInternal: offWriteInt: %#x -> %#x (3) (R=%#x T=%#x S=%#x)\n", offWriteInt, offNew, offRead, u8Type, cbFrame)); 470 470 … … 661 661 if (offNew >= pRingBuf->offEnd) 662 662 offNew = pRingBuf->offStart; 663 if (RT_ UNLIKELY(!ASMAtomicCmpXchgU32(&pRingBuf->offWriteInt, offNew, offWriteInt)))664 return VERR_WRONG_ORDER; /* race */663 if (RT_LIKELY(ASMAtomicCmpXchgU32(&pRingBuf->offWriteInt, offNew, offWriteInt))) 664 { /* likely */ } else return VERR_WRONG_ORDER; /* race */ 665 665 Log2(("IntNetRingWriteFrame: offWriteInt: %#x -> %#x (1)\n", offWriteInt, offNew)); 666 666 … … 686 686 { 687 687 uint32_t offNew = pRingBuf->offStart + cb; 688 if (RT_ UNLIKELY(!ASMAtomicCmpXchgU32(&pRingBuf->offWriteInt, offNew, offWriteInt)))689 return VERR_WRONG_ORDER; /* race */688 if (RT_LIKELY(ASMAtomicCmpXchgU32(&pRingBuf->offWriteInt, offNew, offWriteInt))) 689 { /* likely */ } else return VERR_WRONG_ORDER; /* race */ 690 690 Log2(("IntNetRingWriteFrame: offWriteInt: %#x -> %#x (2)\n", offWriteInt, offNew)); 691 691 … … 710 710 { 711 711 uint32_t offNew = offWriteInt + cb + sizeof(INTNETHDR); 712 if (RT_ UNLIKELY(!ASMAtomicCmpXchgU32(&pRingBuf->offWriteInt, offNew, offWriteInt)))713 return VERR_WRONG_ORDER; /* race */712 if (RT_LIKELY(ASMAtomicCmpXchgU32(&pRingBuf->offWriteInt, offNew, offWriteInt))) 713 { /* likely */ } else return VERR_WRONG_ORDER; /* race */ 714 714 Log2(("IntNetRingWriteFrame: offWriteInt: %#x -> %#x (3)\n", offWriteInt, offNew)); 715 715
Note:
See TracChangeset
for help on using the changeset viewer.

