- Timestamp:
- May 6, 2011 11:55:42 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/semfastmutex-r0drv-linux.c
r29661 r36979 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2011 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 36 36 #include <iprt/asm.h> 37 37 #include <iprt/err.h> 38 #if def IPRT_DEBUG_SEMS38 #if defined(RT_STRICT) || defined(IPRT_DEBUG_SEMS) 39 39 # include <iprt/thread.h> 40 40 #endif … … 55 55 /** the linux semaphore. */ 56 56 struct semaphore Semaphore; 57 #if def IPRT_DEBUG_SEMS57 #if defined(RT_STRICT) || defined(IPRT_DEBUG_SEMS) 58 58 /** For check. */ 59 59 RTNATIVETHREAD volatile Owner; … … 77 77 pThis->u32Magic = RTSEMFASTMUTEX_MAGIC; 78 78 sema_init(&pThis->Semaphore, 1); 79 #if def IPRT_DEBUG_SEMS79 #if defined(RT_STRICT) || defined(IPRT_DEBUG_SEMS) 80 80 pThis->Owner = NIL_RTNATIVETHREAD; 81 81 #endif … … 116 116 IPRT_DEBUG_SEMS_STATE(pThis, 'd'); 117 117 down(&pThis->Semaphore); 118 #if def IPRT_DEBUG_SEMS118 #if defined(RT_STRICT) || defined(IPRT_DEBUG_SEMS) 119 119 IPRT_DEBUG_SEMS_STATE(pThis, 'o'); 120 120 AssertRelease(pThis->Owner == NIL_RTNATIVETHREAD); … … 135 135 AssertMsgReturn(pThis->u32Magic == RTSEMFASTMUTEX_MAGIC, ("u32Magic=%RX32 pThis=%p\n", pThis->u32Magic, pThis), VERR_INVALID_HANDLE); 136 136 137 #if def IPRT_DEBUG_SEMS137 #if defined(RT_STRICT) || defined(IPRT_DEBUG_SEMS) 138 138 AssertRelease(pThis->Owner == RTThreadNativeSelf()); 139 139 ASMAtomicUoWriteSize(&pThis->Owner, NIL_RTNATIVETHREAD);
Note:
See TracChangeset
for help on using the changeset viewer.