VirtualBox

Changeset 25723 in vbox for trunk/src/VBox/Runtime/generic


Ignore:
Timestamp:
Jan 11, 2010 2:28:57 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56466
Message:

iprt/RTSemRW: A little cleanup.

Location:
trunk/src/VBox/Runtime/generic
Files:
2 edited

Legend:

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

    r25711 r25723  
    170170
    171171
    172 RTDECL(int) RTSemRWDestroy(RTSEMRW RWSem)
    173 {
    174     struct RTSEMRWINTERNAL *pThis = RWSem;
     172RTDECL(int) RTSemRWDestroy(RTSEMRW hRWSem)
     173{
     174    struct RTSEMRWINTERNAL *pThis = hRWSem;
    175175
    176176    /*
     
    254254
    255255
    256 DECL_FORCE_INLINE(int) rtSemRWRequestRead(RTSEMRW RWSem, unsigned cMillies, bool fInterruptible, PCRTLOCKVALSRCPOS pSrcPos)
     256DECL_FORCE_INLINE(int) rtSemRWRequestRead(RTSEMRW hRWSem, RTMSINTERVAL cMillies, bool fInterruptible, PCRTLOCKVALSRCPOS pSrcPos)
    257257{
    258258    /*
    259259     * Validate handle.
    260260     */
    261     struct RTSEMRWINTERNAL *pThis = RWSem;
     261    struct RTSEMRWINTERNAL *pThis = hRWSem;
    262262    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    263263    AssertReturn(pThis->u32Magic == RTSEMRW_MAGIC, VERR_INVALID_HANDLE);
     
    288288    if (RT_FAILURE(rc))
    289289    {
    290         AssertMsgFailed(("RTCritSectEnter failed on rwsem %p, rc=%Rrc\n", RWSem, rc));
     290        AssertMsgFailed(("RTCritSectEnter failed on rwsem %p, rc=%Rrc\n", hRWSem, rc));
    291291        return rc;
    292292    }
     
    374374        if (RT_FAILURE(rc) && rc != VERR_TIMEOUT) /* handle timeout below */
    375375        {
    376             AssertMsgRC(rc, ("RTSemEventMultiWait failed on rwsem %p, rc=%Rrc\n", RWSem, rc));
     376            AssertMsgRC(rc, ("RTSemEventMultiWait failed on rwsem %p, rc=%Rrc\n", hRWSem, rc));
    377377            break;
    378378        }
     
    390390        if (RT_FAILURE(rc))
    391391        {
    392             AssertMsgFailed(("RTCritSectEnter failed on rwsem %p, rc=%Rrc\n", RWSem, rc));
     392            AssertMsgFailed(("RTCritSectEnter failed on rwsem %p, rc=%Rrc\n", hRWSem, rc));
    393393            break;
    394394        }
     
    429429
    430430#undef RTSemRWRequestRead
    431 RTDECL(int) RTSemRWRequestRead(RTSEMRW RWSem, unsigned cMillies)
     431RTDECL(int) RTSemRWRequestRead(RTSEMRW hRWSem, RTMSINTERVAL cMillies)
    432432{
    433433#ifndef RTSEMRW_STRICT
    434     return rtSemRWRequestRead(RWSem, cMillies, false, NULL);
     434    return rtSemRWRequestRead(hRWSem, cMillies, false, NULL);
    435435#else
    436436    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
    437     return rtSemRWRequestRead(RWSem, cMillies, false, &SrcPos);
     437    return rtSemRWRequestRead(hRWSem, cMillies, false, &SrcPos);
    438438#endif
    439439}
     
    441441
    442442
    443 RTDECL(int) RTSemRWRequestReadDebug(RTSEMRW RWSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
     443RTDECL(int) RTSemRWRequestReadDebug(RTSEMRW hRWSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
    444444{
    445445    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API();
    446     return rtSemRWRequestRead(RWSem, cMillies, false, &SrcPos);
     446    return rtSemRWRequestRead(hRWSem, cMillies, false, &SrcPos);
    447447}
    448448RT_EXPORT_SYMBOL(RTSemRWRequestReadDebug);
     
    450450
    451451#undef RTSemRWRequestReadNoResume
    452 RTDECL(int) RTSemRWRequestReadNoResume(RTSEMRW RWSem, unsigned cMillies)
     452RTDECL(int) RTSemRWRequestReadNoResume(RTSEMRW hRWSem, RTMSINTERVAL cMillies)
    453453{
    454454#ifndef RTSEMRW_STRICT
    455     return rtSemRWRequestRead(RWSem, cMillies, true, NULL);
     455    return rtSemRWRequestRead(hRWSem, cMillies, true, NULL);
    456456#else
    457457    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
    458     return rtSemRWRequestRead(RWSem, cMillies, true, &SrcPos);
     458    return rtSemRWRequestRead(hRWSem, cMillies, true, &SrcPos);
    459459#endif
    460460}
     
    462462
    463463
    464 RTDECL(int) RTSemRWRequestReadNoResumeDebug(RTSEMRW RWSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
     464RTDECL(int) RTSemRWRequestReadNoResumeDebug(RTSEMRW hRWSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
    465465{
    466466    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API();
    467     return rtSemRWRequestRead(RWSem, cMillies, true, &SrcPos);
     467    return rtSemRWRequestRead(hRWSem, cMillies, true, &SrcPos);
    468468}
    469469RT_EXPORT_SYMBOL(RTSemRWRequestReadNoResumeDebug);
    470470
    471471
    472 RTDECL(int) RTSemRWReleaseRead(RTSEMRW RWSem)
    473 {
    474     struct RTSEMRWINTERNAL *pThis = RWSem;
     472RTDECL(int) RTSemRWReleaseRead(RTSEMRW hRWSem)
     473{
     474    struct RTSEMRWINTERNAL *pThis = hRWSem;
    475475
    476476    /*
     
    502502                    {
    503503                        rc = RTSemEventSignal(pThis->WriteEvent);
    504                         AssertMsgRC(rc, ("Failed to signal writers on rwsem %p, rc=%Rrc\n", RWSem, rc));
     504                        AssertMsgRC(rc, ("Failed to signal writers on rwsem %p, rc=%Rrc\n", hRWSem, rc));
    505505                    }
    506506                }
     
    543543    }
    544544    else
    545         AssertMsgFailed(("RTCritSectEnter failed on rwsem %p, rc=%Rrc\n", RWSem, rc));
     545        AssertMsgFailed(("RTCritSectEnter failed on rwsem %p, rc=%Rrc\n", hRWSem, rc));
    546546
    547547    return rc;
     
    550550
    551551
    552 DECL_FORCE_INLINE(int) rtSemRWRequestWrite(RTSEMRW RWSem, unsigned cMillies, bool fInterruptible, PCRTLOCKVALSRCPOS pSrcPos)
     552DECL_FORCE_INLINE(int) rtSemRWRequestWrite(RTSEMRW hRWSem, RTMSINTERVAL cMillies, bool fInterruptible, PCRTLOCKVALSRCPOS pSrcPos)
    553553{
    554554    /*
    555555     * Validate handle.
    556556     */
    557     struct RTSEMRWINTERNAL *pThis = RWSem;
     557    struct RTSEMRWINTERNAL *pThis = hRWSem;
    558558    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    559559    AssertReturn(pThis->u32Magic == RTSEMRW_MAGIC, VERR_INVALID_HANDLE);
     
    581581    if (RT_FAILURE(rc))
    582582    {
    583         AssertMsgFailed(("RTCritSectEnter failed on rwsem %p, rc=%Rrc\n", RWSem, rc));
     583        AssertMsgFailed(("RTCritSectEnter failed on rwsem %p, rc=%Rrc\n", hRWSem, rc));
    584584        return rc;
    585585    }
     
    605605            pThis->fNeedResetReadEvent = false;
    606606            rc = RTSemEventMultiReset(pThis->ReadEvent);
    607             AssertMsgRC(rc, ("Failed to reset readers, rwsem %p, rc=%Rrc.\n", RWSem, rc));
     607            AssertMsgRC(rc, ("Failed to reset readers, rwsem %p, rc=%Rrc.\n", hRWSem, rc));
    608608        }
    609609
     
    665665        if (RT_UNLIKELY(RT_FAILURE_NP(rc) && rc != VERR_TIMEOUT)) /* timeouts are handled below */
    666666        {
    667             AssertMsgRC(rc, ("RTSemEventWait failed on rwsem %p, rc=%Rrc\n", RWSem, rc));
     667            AssertMsgRC(rc, ("RTSemEventWait failed on rwsem %p, rc=%Rrc\n", hRWSem, rc));
    668668            break;
    669669        }
     
    681681        if (RT_FAILURE(rc))
    682682        {
    683             AssertMsgFailed(("RTCritSectEnter failed on rwsem %p, rc=%Rrc\n", RWSem, rc));
     683            AssertMsgFailed(("RTCritSectEnter failed on rwsem %p, rc=%Rrc\n", hRWSem, rc));
    684684            break;
    685685        }
     
    694694                pThis->fNeedResetReadEvent = false;
    695695                rc = RTSemEventMultiReset(pThis->ReadEvent);
    696                 AssertMsgRC(rc, ("Failed to reset readers, rwsem %p, rc=%Rrc.\n", RWSem, rc));
     696                AssertMsgRC(rc, ("Failed to reset readers, rwsem %p, rc=%Rrc.\n", hRWSem, rc));
    697697            }
    698698
     
    735735
    736736#undef RTSemRWRequestWrite
    737 RTDECL(int) RTSemRWRequestWrite(RTSEMRW RWSem, unsigned cMillies)
     737RTDECL(int) RTSemRWRequestWrite(RTSEMRW hRWSem, RTMSINTERVAL cMillies)
    738738{
    739739#ifndef RTSEMRW_STRICT
    740     return rtSemRWRequestWrite(RWSem, cMillies, false, NULL);
     740    return rtSemRWRequestWrite(hRWSem, cMillies, false, NULL);
    741741#else
    742742    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
    743     return rtSemRWRequestWrite(RWSem, cMillies, false, &SrcPos);
     743    return rtSemRWRequestWrite(hRWSem, cMillies, false, &SrcPos);
    744744#endif
    745745}
     
    747747
    748748
    749 RTDECL(int) RTSemRWRequestWriteDebug(RTSEMRW RWSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
     749RTDECL(int) RTSemRWRequestWriteDebug(RTSEMRW hRWSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
    750750{
    751751    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API();
    752     return rtSemRWRequestWrite(RWSem, cMillies, false, &SrcPos);
     752    return rtSemRWRequestWrite(hRWSem, cMillies, false, &SrcPos);
    753753}
    754754RT_EXPORT_SYMBOL(RTSemRWRequestWriteDebug);
     
    756756
    757757#undef RTSemRWRequestWriteNoResume
    758 RTDECL(int) RTSemRWRequestWriteNoResume(RTSEMRW RWSem, unsigned cMillies)
     758RTDECL(int) RTSemRWRequestWriteNoResume(RTSEMRW hRWSem, RTMSINTERVAL cMillies)
    759759{
    760760#ifndef RTSEMRW_STRICT
    761     return rtSemRWRequestWrite(RWSem, cMillies, true, NULL);
     761    return rtSemRWRequestWrite(hRWSem, cMillies, true, NULL);
    762762#else
    763763    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
    764     return rtSemRWRequestWrite(RWSem, cMillies, true, &SrcPos);
     764    return rtSemRWRequestWrite(hRWSem, cMillies, true, &SrcPos);
    765765#endif
    766766}
     
    768768
    769769
    770 RTDECL(int) RTSemRWRequestWriteNoResumeDebug(RTSEMRW RWSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
     770RTDECL(int) RTSemRWRequestWriteNoResumeDebug(RTSEMRW hRWSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
    771771{
    772772    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API();
    773     return rtSemRWRequestWrite(RWSem, cMillies, true, &SrcPos);
     773    return rtSemRWRequestWrite(hRWSem, cMillies, true, &SrcPos);
    774774}
    775775RT_EXPORT_SYMBOL(RTSemRWRequestWriteNoResumeDebug);
    776776
    777777
    778 RTDECL(int) RTSemRWReleaseWrite(RTSEMRW RWSem)
     778RTDECL(int) RTSemRWReleaseWrite(RTSEMRW hRWSem)
    779779{
    780780
     
    782782     * Validate handle.
    783783     */
    784     struct RTSEMRWINTERNAL *pThis = RWSem;
     784    struct RTSEMRWINTERNAL *pThis = hRWSem;
    785785    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    786786    AssertReturn(pThis->u32Magic == RTSEMRW_MAGIC, VERR_INVALID_HANDLE);
     
    799799    {
    800800        RTCritSectLeave(&pThis->CritSect);
    801         AssertMsgFailed(("Not read-write owner of rwsem %p.\n", RWSem));
     801        AssertMsgFailed(("Not read-write owner of rwsem %p.\n", hRWSem));
    802802        return VERR_NOT_OWNER;
    803803    }
     
    839839    {
    840840        rc = RTSemEventMultiSignal(pThis->ReadEvent);
    841         AssertMsgRC(rc, ("RTSemEventMultiSignal failed for rwsem %p, rc=%Rrc.\n", RWSem, rc));
     841        AssertMsgRC(rc, ("RTSemEventMultiSignal failed for rwsem %p, rc=%Rrc.\n", hRWSem, rc));
    842842        pThis->fNeedResetReadEvent = true;
    843843    }
     
    845845    {
    846846        rc = RTSemEventSignal(pThis->WriteEvent);
    847         AssertMsgRC(rc, ("Failed to signal writers on rwsem %p, rc=%Rrc\n", RWSem, rc));
     847        AssertMsgRC(rc, ("Failed to signal writers on rwsem %p, rc=%Rrc\n", hRWSem, rc));
    848848    }
    849849    RTCritSectLeave(&pThis->CritSect);
     
    854854
    855855
    856 RTDECL(bool) RTSemRWIsWriteOwner(RTSEMRW RWSem)
    857 {
    858     struct RTSEMRWINTERNAL *pThis = RWSem;
     856RTDECL(bool) RTSemRWIsWriteOwner(RTSEMRW hRWSem)
     857{
     858    struct RTSEMRWINTERNAL *pThis = hRWSem;
    859859
    860860    /*
     
    875875
    876876
    877 RTDECL(uint32_t) RTSemRWGetWriteRecursion(RTSEMRW RWSem)
    878 {
    879     struct RTSEMRWINTERNAL *pThis = RWSem;
     877RTDECL(uint32_t) RTSemRWGetWriteRecursion(RTSEMRW hRWSem)
     878{
     879    struct RTSEMRWINTERNAL *pThis = hRWSem;
    880880
    881881    /*
     
    893893
    894894
    895 RTDECL(uint32_t) RTSemRWGetWriterReadRecursion(RTSEMRW RWSem)
    896 {
    897     struct RTSEMRWINTERNAL *pThis = RWSem;
     895RTDECL(uint32_t) RTSemRWGetWriterReadRecursion(RTSEMRW hRWSem)
     896{
     897    struct RTSEMRWINTERNAL *pThis = hRWSem;
    898898
    899899    /*
     
    911911
    912912
    913 RTDECL(uint32_t) RTSemRWGetReadCount(RTSEMRW RWSem)
     913RTDECL(uint32_t) RTSemRWGetReadCount(RTSEMRW hRWSem)
    914914{
    915915    /*
    916916     * Validate input.
    917917     */
    918     struct RTSEMRWINTERNAL *pThis = RWSem;
     918    struct RTSEMRWINTERNAL *pThis = hRWSem;
    919919    AssertPtrReturn(pThis, 0);
    920920    AssertMsgReturn(pThis->u32Magic == RTSEMRW_MAGIC,
  • trunk/src/VBox/Runtime/generic/semrw-lockless-generic.cpp

    r25710 r25723  
    222222
    223223
    224 static int rtSemRWRequestRead(RTSEMRW hRWSem, unsigned cMillies, bool fInterruptible, PCRTLOCKVALSRCPOS pSrcPos)
     224static int rtSemRWRequestRead(RTSEMRW hRWSem, RTMSINTERVAL cMillies, bool fInterruptible, PCRTLOCKVALSRCPOS pSrcPos)
    225225{
    226226    /*
     
    418418
    419419#undef RTSemRWRequestRead
    420 RTDECL(int) RTSemRWRequestRead(RTSEMRW RWSem, unsigned cMillies)
     420RTDECL(int) RTSemRWRequestRead(RTSEMRW hRWSem, RTMSINTERVAL cMillies)
    421421{
    422422#ifndef RTSEMRW_STRICT
    423     return rtSemRWRequestRead(RWSem, cMillies, false, NULL);
     423    return rtSemRWRequestRead(hRWSem, cMillies, false, NULL);
    424424#else
    425425    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
    426     return rtSemRWRequestRead(RWSem, cMillies, false, &SrcPos);
     426    return rtSemRWRequestRead(hRWSem, cMillies, false, &SrcPos);
    427427#endif
    428428}
     
    430430
    431431
    432 RTDECL(int) RTSemRWRequestReadDebug(RTSEMRW RWSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
     432RTDECL(int) RTSemRWRequestReadDebug(RTSEMRW hRWSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
    433433{
    434434    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API();
    435     return rtSemRWRequestRead(RWSem, cMillies, false, &SrcPos);
     435    return rtSemRWRequestRead(hRWSem, cMillies, false, &SrcPos);
    436436}
    437437RT_EXPORT_SYMBOL(RTSemRWRequestReadDebug);
     
    439439
    440440#undef RTSemRWRequestReadNoResume
    441 RTDECL(int) RTSemRWRequestReadNoResume(RTSEMRW RWSem, unsigned cMillies)
     441RTDECL(int) RTSemRWRequestReadNoResume(RTSEMRW hRWSem, RTMSINTERVAL cMillies)
    442442{
    443443#ifndef RTSEMRW_STRICT
    444     return rtSemRWRequestRead(RWSem, cMillies, true, NULL);
     444    return rtSemRWRequestRead(hRWSem, cMillies, true, NULL);
    445445#else
    446446    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
    447     return rtSemRWRequestRead(RWSem, cMillies, true, &SrcPos);
     447    return rtSemRWRequestRead(hRWSem, cMillies, true, &SrcPos);
    448448#endif
    449449}
     
    451451
    452452
    453 RTDECL(int) RTSemRWRequestReadNoResumeDebug(RTSEMRW RWSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
     453RTDECL(int) RTSemRWRequestReadNoResumeDebug(RTSEMRW hRWSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
    454454{
    455455    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API();
    456     return rtSemRWRequestRead(RWSem, cMillies, true, &SrcPos);
     456    return rtSemRWRequestRead(hRWSem, cMillies, true, &SrcPos);
    457457}
    458458RT_EXPORT_SYMBOL(RTSemRWRequestReadNoResumeDebug);
     
    460460
    461461
    462 RTDECL(int) RTSemRWReleaseRead(RTSEMRW RWSem)
     462RTDECL(int) RTSemRWReleaseRead(RTSEMRW hRWSem)
    463463{
    464464    /*
    465465     * Validate handle.
    466466     */
    467     RTSEMRWINTERNAL *pThis = RWSem;
     467    RTSEMRWINTERNAL *pThis = hRWSem;
    468468    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    469469    AssertReturn(pThis->u32Magic == RTSEMRW_MAGIC, VERR_INVALID_HANDLE);
     
    534534
    535535
    536 DECL_FORCE_INLINE(int) rtSemRWRequestWrite(RTSEMRW hRWSem, unsigned cMillies, bool fInterruptible, PCRTLOCKVALSRCPOS pSrcPos)
     536DECL_FORCE_INLINE(int) rtSemRWRequestWrite(RTSEMRW hRWSem, RTMSINTERVAL cMillies, bool fInterruptible, PCRTLOCKVALSRCPOS pSrcPos)
    537537{
    538538    /*
     
    709709
    710710#undef RTSemRWRequestWrite
    711 RTDECL(int) RTSemRWRequestWrite(RTSEMRW RWSem, unsigned cMillies)
     711RTDECL(int) RTSemRWRequestWrite(RTSEMRW hRWSem, RTMSINTERVAL cMillies)
    712712{
    713713#ifndef RTSEMRW_STRICT
    714     return rtSemRWRequestWrite(RWSem, cMillies, false, NULL);
     714    return rtSemRWRequestWrite(hRWSem, cMillies, false, NULL);
    715715#else
    716716    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
    717     return rtSemRWRequestWrite(RWSem, cMillies, false, &SrcPos);
     717    return rtSemRWRequestWrite(hRWSem, cMillies, false, &SrcPos);
    718718#endif
    719719}
     
    721721
    722722
    723 RTDECL(int) RTSemRWRequestWriteDebug(RTSEMRW RWSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
     723RTDECL(int) RTSemRWRequestWriteDebug(RTSEMRW hRWSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
    724724{
    725725    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API();
    726     return rtSemRWRequestWrite(RWSem, cMillies, false, &SrcPos);
     726    return rtSemRWRequestWrite(hRWSem, cMillies, false, &SrcPos);
    727727}
    728728RT_EXPORT_SYMBOL(RTSemRWRequestWriteDebug);
     
    730730
    731731#undef RTSemRWRequestWriteNoResume
    732 RTDECL(int) RTSemRWRequestWriteNoResume(RTSEMRW RWSem, unsigned cMillies)
     732RTDECL(int) RTSemRWRequestWriteNoResume(RTSEMRW hRWSem, RTMSINTERVAL cMillies)
    733733{
    734734#ifndef RTSEMRW_STRICT
    735     return rtSemRWRequestWrite(RWSem, cMillies, true, NULL);
     735    return rtSemRWRequestWrite(hRWSem, cMillies, true, NULL);
    736736#else
    737737    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
    738     return rtSemRWRequestWrite(RWSem, cMillies, true, &SrcPos);
     738    return rtSemRWRequestWrite(hRWSem, cMillies, true, &SrcPos);
    739739#endif
    740740}
     
    742742
    743743
    744 RTDECL(int) RTSemRWRequestWriteNoResumeDebug(RTSEMRW RWSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
     744RTDECL(int) RTSemRWRequestWriteNoResumeDebug(RTSEMRW hRWSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
    745745{
    746746    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API();
    747     return rtSemRWRequestWrite(RWSem, cMillies, true, &SrcPos);
     747    return rtSemRWRequestWrite(hRWSem, cMillies, true, &SrcPos);
    748748}
    749749RT_EXPORT_SYMBOL(RTSemRWRequestWriteNoResumeDebug);
    750750
    751751
    752 RTDECL(int) RTSemRWReleaseWrite(RTSEMRW RWSem)
     752RTDECL(int) RTSemRWReleaseWrite(RTSEMRW hRWSem)
    753753{
    754754
     
    756756     * Validate handle.
    757757     */
    758     struct RTSEMRWINTERNAL *pThis = RWSem;
     758    struct RTSEMRWINTERNAL *pThis = hRWSem;
    759759    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    760760    AssertReturn(pThis->u32Magic == RTSEMRW_MAGIC, VERR_INVALID_HANDLE);
     
    844844
    845845
    846 RTDECL(bool) RTSemRWIsWriteOwner(RTSEMRW RWSem)
     846RTDECL(bool) RTSemRWIsWriteOwner(RTSEMRW hRWSem)
    847847{
    848848    /*
    849849     * Validate handle.
    850850     */
    851     struct RTSEMRWINTERNAL *pThis = RWSem;
     851    struct RTSEMRWINTERNAL *pThis = hRWSem;
    852852    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    853853    AssertReturn(pThis->u32Magic == RTSEMRW_MAGIC, VERR_INVALID_HANDLE);
     
    864864
    865865
    866 RTDECL(uint32_t) RTSemRWGetWriteRecursion(RTSEMRW RWSem)
     866RTDECL(uint32_t) RTSemRWGetWriteRecursion(RTSEMRW hRWSem)
    867867{
    868868    /*
    869869     * Validate handle.
    870870     */
    871     struct RTSEMRWINTERNAL *pThis = RWSem;
     871    struct RTSEMRWINTERNAL *pThis = hRWSem;
    872872    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    873873    AssertReturn(pThis->u32Magic == RTSEMRW_MAGIC, VERR_INVALID_HANDLE);
     
    881881
    882882
    883 RTDECL(uint32_t) RTSemRWGetWriterReadRecursion(RTSEMRW RWSem)
     883RTDECL(uint32_t) RTSemRWGetWriterReadRecursion(RTSEMRW hRWSem)
    884884{
    885885    /*
    886886     * Validate handle.
    887887     */
    888     struct RTSEMRWINTERNAL *pThis = RWSem;
     888    struct RTSEMRWINTERNAL *pThis = hRWSem;
    889889    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    890890    AssertReturn(pThis->u32Magic == RTSEMRW_MAGIC, VERR_INVALID_HANDLE);
     
    898898
    899899
    900 RTDECL(uint32_t) RTSemRWGetReadCount(RTSEMRW RWSem)
     900RTDECL(uint32_t) RTSemRWGetReadCount(RTSEMRW hRWSem)
    901901{
    902902    /*
    903903     * Validate input.
    904904     */
    905     struct RTSEMRWINTERNAL *pThis = RWSem;
     905    struct RTSEMRWINTERNAL *pThis = hRWSem;
    906906    AssertPtrReturn(pThis, 0);
    907907    AssertMsgReturn(pThis->u32Magic == RTSEMRW_MAGIC,
Note: See TracChangeset for help on using the changeset viewer.

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