VirtualBox

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


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/posix/semmutex-posix.cpp

    r25618 r25624  
    331331     */
    332332    pThis->Owner = (pthread_t)-1;
    333     ASMAtomicXchgU32(&pThis->cNesting, 0);
     333    ASMAtomicWriteU32(&pThis->cNesting, 0);
    334334
    335335    /*
     
    346346}
    347347
     348
     349RTDECL(bool) RTSemMutexIsOwned(RTSEMMUTEX hMutex)
     350{
     351    /*
     352     * Validate.
     353     */
     354    RTSEMMUTEXINTERNAL *pThis = hMutex;
     355    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     356    AssertReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, VERR_INVALID_HANDLE);
     357
     358    return pThis->Owner != (pthread_t)-1;
     359}
     360
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