VirtualBox

Changeset 25398 in vbox for trunk/src/VBox/Runtime/include


Ignore:
Timestamp:
Dec 15, 2009 12:58:08 PM (15 years ago)
Author:
vboxsync
Message:

IPRT,PDMAllocCritSect: Don't bitch when recursivly entering a mutex.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/include/internal/strict.h

    r25373 r25398  
    4343
    4444#ifdef RTCRITSECT_STRICT
    45 # define RTCRITSECT_STRICT_POS_DECL         RTHCUINTPTR uId, RT_SRC_POS_DECL
    46 # define RTCRITSECT_STRICT_POS_ARGS         uId, RT_SRC_POS_ARGS
    47 # define RTCRITSECT_STRICT_BLOCK_ARGS(pRec) pRec,     uId, RT_SRC_POS_ARGS
     45# define RTCRITSECT_STRICT_POS_DECL             RTHCUINTPTR uId, RT_SRC_POS_DECL
     46# define RTCRITSECT_STRICT_POS_ARGS             uId, RT_SRC_POS_ARGS
     47# define RTCRITSECT_STRICT_BLOCK(hThread, pRec, fRecursive) \
     48                                                RTThreadBlockingDebug((hThread), RTTHREADSTATE_CRITSECT, fRecursive, pRec, uId, RT_SRC_POS_ARGS)
    4849#else
    49 # define RTCRITSECT_STRICT_POS_DECL         int iDummy
    50 # define RTCRITSECT_STRICT_POS_ARGS         0
    51 # define RTCRITSECT_STRICT_BLOCK_ARGS(pRec) NULL, 0, NULL, 0, NULL
     50# define RTCRITSECT_STRICT_POS_DECL             int iDummy
     51# define RTCRITSECT_STRICT_POS_ARGS             0
     52# define RTCRITSECT_STRICT_BLOCK(hThread, pRec, fRecursive) \
     53                                                RTThreadBlocking((hThread), RTTHREADSTATE_CRITSECT)
    5254#endif
     55#define  RTCRITSECT_STRICT_UNBLOCK(hThread)     RTThreadUnblocked((hThread), RTTHREADSTATE_CRITSECT)
    5356
    5457
     
    6164
    6265#ifdef RTSEMMUTEX_STRICT
    63 # define RTSEMMUTEX_STRICT_POS_DECL         RTHCUINTPTR uId, RT_SRC_POS_DECL
    64 # define RTSEMMUTEX_STRICT_POS_ARGS         uId, RT_SRC_POS_ARGS
    65 # define RTSEMMUTEX_STRICT_BLOCK_ARGS(pRec) pRec,     uId, RT_SRC_POS_ARGS
     66# define RTSEMMUTEX_STRICT_POS_DECL             RTHCUINTPTR uId, RT_SRC_POS_DECL
     67# define RTSEMMUTEX_STRICT_POS_ARGS             uId, RT_SRC_POS_ARGS
     68# define RTSEMMUTEX_STRICT_BLOCK(hThread, pRec) RTThreadBlockingDebug((hThread), RTTHREADSTATE_MUTEX, true, pRec, uId, RT_SRC_POS_ARGS)
    6669#else
    67 # define RTSEMMUTEX_STRICT_POS_DECL         int iDummy
    68 # define RTSEMMUTEX_STRICT_POS_ARGS         0
    69 # define RTSEMMUTEX_STRICT_BLOCK_ARGS(pRec) NULL, 0, NULL, 0, NULL
     70# define RTSEMMUTEX_STRICT_POS_DECL             int iDummy
     71# define RTSEMMUTEX_STRICT_POS_ARGS             0
     72# define RTSEMMUTEX_STRICT_BLOCK(hThread, pRec) RTThreadBlocking((hThread), RTTHREADSTATE_MUTEX)
    7073#endif
     74#define  RTSEMMUTEX_STRICT_UNBLOCK(hThread)     RTThreadUnblocked((hThread), RTTHREADSTATE_MUTEX)
    7175
    7276
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