VirtualBox

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


Ignore:
Timestamp:
Jan 3, 2010 3:23:27 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56315
Message:

iprt/semmutex*: Added RTSemMutexIsOwned. Rewrote mutex recursion handling for windows (semmutex-win.cpp).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/os2/sems-os2.cpp

    r25378 r25624  
    279279
    280280
    281 
     281RTDECL(bool) RTSemMutexIsOwned(RTSEMMUTEX hMutex);
     282{
     283    /*
     284     * Unlock mutex semaphore.
     285     */
     286    PID     pid;
     287    TID     tid;
     288    ULONG   cRecursions;
     289    int rc = DosQueryMutexSem(SEM2HND(MutexSem), &pid, &tid, &cRecursions);
     290    if (!rc)
     291        return cRecursions != 0;
     292    AssertMsgFailed(("DosQueryMutexSem %p failed, rc=%d\n", MutexSem, rc));
     293    return rc == ERROR_SEM_OWNER_DIED;
     294}
     295
     296
     297
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