VirtualBox

Changeset 25721 in vbox for trunk/src/VBox/Runtime/r3/linux


Ignore:
Timestamp:
Jan 11, 2010 2:01:53 PM (15 years ago)
Author:
vboxsync
Message:

iprt/RTSemMutex: MutexSem -> hMutexSem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/linux/semmutex-linux.cpp

    r25715 r25721  
    141141
    142142
    143 RTDECL(int)  RTSemMutexDestroy(RTSEMMUTEX MutexSem)
     143RTDECL(int)  RTSemMutexDestroy(RTSEMMUTEX hMutexSem)
    144144{
    145145    /*
    146146     * Validate input.
    147147     */
    148     if (MutexSem == NIL_RTSEMMUTEX)
     148    if (hMutexSem == NIL_RTSEMMUTEX)
    149149        return VINF_SUCCESS;
    150     struct RTSEMMUTEXINTERNAL *pThis = MutexSem;
     150    struct RTSEMMUTEXINTERNAL *pThis = hMutexSem;
    151151    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    152152    AssertMsgReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC,
    153                     ("MutexSem=%p u32Magic=%#x\n", pThis, pThis->u32Magic),
     153                    ("hMutexSem=%p u32Magic=%#x\n", pThis, pThis->u32Magic),
    154154                    VERR_INVALID_HANDLE);
    155155
     
    194194
    195195
    196 DECL_FORCE_INLINE(int) rtSemMutexRequest(RTSEMMUTEX MutexSem, unsigned cMillies, bool fAutoResume, PCRTLOCKVALSRCPOS pSrcPos)
     196DECL_FORCE_INLINE(int) rtSemMutexRequest(RTSEMMUTEX hMutexSem, unsigned cMillies, bool fAutoResume, PCRTLOCKVALSRCPOS pSrcPos)
    197197{
    198198    /*
    199199     * Validate input.
    200200     */
    201     struct RTSEMMUTEXINTERNAL *pThis = MutexSem;
     201    struct RTSEMMUTEXINTERNAL *pThis = hMutexSem;
    202202    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    203203    AssertReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, VERR_INVALID_HANDLE);
     
    343343
    344344#undef RTSemMutexRequest
    345 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX MutexSem, unsigned cMillies)
     345RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, unsigned cMillies)
    346346{
    347347#ifndef RTSEMMUTEX_STRICT
    348     int rc = rtSemMutexRequest(MutexSem, cMillies, true, NULL);
     348    int rc = rtSemMutexRequest(hMutexSem, cMillies, true, NULL);
    349349#else
    350350    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
    351     int rc = rtSemMutexRequest(MutexSem, cMillies, true, &SrcPos);
     351    int rc = rtSemMutexRequest(hMutexSem, cMillies, true, &SrcPos);
    352352#endif
    353353    Assert(rc != VERR_INTERRUPTED);
     
    356356
    357357
    358 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX MutexSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
     358RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
    359359{
    360360    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API();
    361     int rc = rtSemMutexRequest(MutexSem, cMillies, true, &SrcPos);
     361    int rc = rtSemMutexRequest(hMutexSem, cMillies, true, &SrcPos);
    362362    Assert(rc != VERR_INTERRUPTED);
    363363    return rc;
     
    366366
    367367#undef RTSemMutexRequestNoResume
    368 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX MutexSem, unsigned cMillies)
     368RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, unsigned cMillies)
    369369{
    370370#ifndef RTSEMMUTEX_STRICT
    371     return rtSemMutexRequest(MutexSem, cMillies, false, NULL);
     371    return rtSemMutexRequest(hMutexSem, cMillies, false, NULL);
    372372#else
    373373    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
    374     return rtSemMutexRequest(MutexSem, cMillies, false, &SrcPos);
    375 #endif
    376 }
    377 
    378 
    379 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX MutexSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
     374    return rtSemMutexRequest(hMutexSem, cMillies, false, &SrcPos);
     375#endif
     376}
     377
     378
     379RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
    380380{
    381381    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API();
    382     return rtSemMutexRequest(MutexSem, cMillies, false, &SrcPos);
    383 }
    384 
    385 
    386 RTDECL(int) RTSemMutexRelease(RTSEMMUTEX MutexSem)
     382    return rtSemMutexRequest(hMutexSem, cMillies, false, &SrcPos);
     383}
     384
     385
     386RTDECL(int) RTSemMutexRelease(RTSEMMUTEX hMutexSem)
    387387{
    388388    /*
    389389     * Validate input.
    390390     */
    391     struct RTSEMMUTEXINTERNAL *pThis = MutexSem;
     391    struct RTSEMMUTEXINTERNAL *pThis = hMutexSem;
    392392    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    393393    AssertReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, VERR_INVALID_HANDLE);
     
    440440
    441441
    442 RTDECL(bool) RTSemMutexIsOwned(RTSEMMUTEX hMutex)
     442RTDECL(bool) RTSemMutexIsOwned(RTSEMMUTEX hMutexSem)
    443443{
    444444    /*
    445445     * Validate.
    446446     */
    447     RTSEMMUTEXINTERNAL *pThis = hMutex;
     447    RTSEMMUTEXINTERNAL *pThis = hMutexSem;
    448448    AssertPtrReturn(pThis, false);
    449449    AssertReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, false);
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