VirtualBox

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


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/os2/sems-os2.cpp

    r25720 r25721  
    247247
    248248
     249RTDECL(void) RTSemEventMultiSetSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREAD hThread)
     250{
     251    /** @todo implement RTSemEventMultiSetSignaller on OS/2 */
     252}
     253
     254
     255RTDECL(void) RTSemEventMultiAddSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREAD hThread)
     256{
     257}
     258
     259
     260RTDECL(void) RTSemEventMultiRemoveSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREAD hThread)
     261{
     262}
     263
    249264
    250265
     
    277292
    278293
    279 RTDECL(int)  RTSemMutexDestroy(RTSEMMUTEX MutexSem)
    280 {
     294RTDECL(int)  RTSemMutexDestroy(RTSEMMUTEX hMutexSem)
     295{
     296    if (hMutexSem == NIL_RTSEMMUTEX)
     297        return VINF_SUCCESS;
     298
    281299    /*
    282300     * Close semaphore handle.
    283301     */
    284     int rc = DosCloseMutexSem(SEM2HND(MutexSem));
    285     if (!rc)
    286         return VINF_SUCCESS;
    287     AssertMsgFailed(("Destroy MutexSem %p failed, rc=%d\n", MutexSem, rc));
     302    int rc = DosCloseMutexSem(SEM2HND(hMutexSem));
     303    if (!rc)
     304        return VINF_SUCCESS;
     305    AssertMsgFailed(("Destroy hMutexSem %p failed, rc=%d\n", hMutexSem, rc));
    288306    return RTErrConvertFromOS2(rc);
    289307}
     
    309327
    310328#undef RTSemMutexRequestNoResume
    311 RTDECL(int)  RTSemMutexRequestNoResume(RTSEMMUTEX MutexSem, unsigned cMillies)
     329RTDECL(int)  RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, unsigned cMillies)
    312330{
    313331    /*
    314332     * Lock mutex semaphore.
    315333     */
    316     int rc = DosRequestMutexSem(SEM2HND(MutexSem), cMillies == RT_INDEFINITE_WAIT ? SEM_INDEFINITE_WAIT : cMillies);
     334    int rc = DosRequestMutexSem(SEM2HND(hMutexSem), cMillies == RT_INDEFINITE_WAIT ? SEM_INDEFINITE_WAIT : cMillies);
    317335    switch (rc)
    318336    {
     
    324342        default:
    325343        {
    326             AssertMsgFailed(("Wait on MutexSem %p failed, rc=%d\n", MutexSem, rc));
     344            AssertMsgFailed(("Wait on hMutexSem %p failed, rc=%d\n", hMutexSem, rc));
    327345            return RTErrConvertFromOS2(rc);
    328346        }
     
    330348}
    331349
    332 RTDECL(int)  RTSemMutexRelease(RTSEMMUTEX MutexSem)
     350RTDECL(int)  RTSemMutexRelease(RTSEMMUTEX hMutexSem)
    333351{
    334352    /*
    335353     * Unlock mutex semaphore.
    336354     */
    337     int rc = DosReleaseMutexSem(SEM2HND(MutexSem));
    338     if (!rc)
    339         return VINF_SUCCESS;
    340     AssertMsgFailed(("Release MutexSem %p failed, rc=%d\n", MutexSem, rc));
    341     return RTErrConvertFromOS2(rc);
    342 }
    343 
    344 
    345 RTDECL(bool) RTSemMutexIsOwned(RTSEMMUTEX hMutex);
     355    int rc = DosReleaseMutexSem(SEM2HND(hMutexSem));
     356    if (!rc)
     357        return VINF_SUCCESS;
     358    AssertMsgFailed(("Release hMutexSem %p failed, rc=%d\n", hMutexSem, rc));
     359    return RTErrConvertFromOS2(rc);
     360}
     361
     362
     363RTDECL(bool) RTSemMutexIsOwned(RTSEMMUTEX hMutexSem);
    346364{
    347365    /*
     
    351369    TID     tid;
    352370    ULONG   cRecursions;
    353     int rc = DosQueryMutexSem(SEM2HND(MutexSem), &pid, &tid, &cRecursions);
     371    int rc = DosQueryMutexSem(SEM2HND(hMutexSem), &pid, &tid, &cRecursions);
    354372    if (!rc)
    355373        return cRecursions != 0;
    356     AssertMsgFailed(("DosQueryMutexSem %p failed, rc=%d\n", MutexSem, rc));
     374    AssertMsgFailed(("DosQueryMutexSem %p failed, rc=%d\n", hMutexSem, rc));
    357375    return rc == ERROR_SEM_OWNER_DIED;
    358376}
    359377
    360 
    361 RTDECL(void) RTSemEventMultiSetSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREAD hThread)
    362 {
    363     /** @todo implement RTSemEventMultiSetSignaller on OS/2 */
    364 }
    365 
    366 
    367 RTDECL(void) RTSemEventMultiAddSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREAD hThread)
    368 {
    369 }
    370 
    371 
    372 RTDECL(void) RTSemEventMultiRemoveSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREAD hThread)
    373 {
    374 }
    375 
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