VirtualBox

Changeset 28517 in vbox


Ignore:
Timestamp:
Apr 20, 2010 12:30:12 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60319
Message:

semmutex-r0drv-nt.cpp: Made a shot at RTSemMutexIsOwned.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/nt/semmutex-r0drv-nt.cpp

    r25724 r28517  
    219219}
    220220
     221
     222RTDECL(bool) RTSemMutexIsOwned(RTSEMMUTEX hMutexSem)
     223{
     224    /*
     225     * Validate.
     226     */
     227    RTSEMMUTEXINTERNAL *pThis = hMutexSem;
     228    AssertPtrReturn(pThis, false);
     229    AssertReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, false);
     230
     231#ifdef RT_USE_FAST_MUTEX
     232    return pThis->Mutex && pThis->Mutex->Owner != NULL;
     233#else
     234    return KeReadStateMutex(pThis->Mutex) == 1);
     235#endif
     236}
     237
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