Changeset 25616 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Jan 2, 2010 12:13:19 AM (15 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/generic/semrw-generic.cpp
r25614 r25616 513 513 */ 514 514 RTNATIVETHREAD hNativeSelf = pThis->CritSect.NativeThreadOwner; 515 if (!pThis->cReads && (!pThis->cWrites || pThis->hWriter == hNativeSelf)) 515 if ( !pThis->cReads 516 && ( ( !pThis->cWrites 517 && ( !pThis->cWritesWaiting /* play fair if we can wait */ 518 || !cMillies) 519 ) 520 || pThis->hWriter == hNativeSelf 521 ) 522 ) 516 523 { 517 524 /* … … 785 792 } 786 793 RT_EXPORT_SYMBOL(RTSemRWGetWriterReadRecursion); 794 795 796 RTDECL(uint32_t) RTSemRWGetReadCount(RTSEMRW RWSem) 797 { 798 /* 799 * Validate input. 800 */ 801 struct RTSEMRWINTERNAL *pThis = RWSem; 802 AssertPtrReturn(pThis, 0); 803 AssertMsgReturn(pThis->u32Magic == RTSEMRW_MAGIC, 804 ("pThis=%p u32Magic=%#x\n", pThis, pThis->u32Magic), 805 0); 806 807 /* 808 * Return the requested data. 809 */ 810 return pThis->cReads; 811 } 812 RT_EXPORT_SYMBOL(RTSemRWGetReadCount); 813 -
trunk/src/VBox/Runtime/r3/posix/semrw-posix.cpp
r25615 r25616 590 590 return pThis->cWriterReads; 591 591 } 592 593 594 RTDECL(uint32_t) RTSemRWGetReadCount(RTSEMRW RWSem) 595 { 596 /* 597 * Validate input. 598 */ 599 struct RTSEMRWINTERNAL *pThis = RWSem; 600 AssertPtrReturn(pThis, 0); 601 AssertMsgReturn(pThis->u32Magic == RTSEMRW_MAGIC, 602 ("pThis=%p u32Magic=%#x\n", pThis, pThis->u32Magic), 603 0); 604 605 /* 606 * Return the requested data. 607 */ 608 return pThis->cReaders; 609 } 610
Note:
See TracChangeset
for help on using the changeset viewer.