VirtualBox

Changeset 25616 in vbox for trunk/src/VBox/Runtime/r3


Ignore:
Timestamp:
Jan 2, 2010 12:13:19 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56307
Message:

iprt/semrw-*: Added RTSemRWGetReadCount. Adjusted writer fairness a little bit in semrw-generic.cpp.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/semrw-posix.cpp

    r25615 r25616  
    590590    return pThis->cWriterReads;
    591591}
     592
     593
     594RTDECL(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.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette