Changeset 22579 in vbox
- Timestamp:
- Aug 30, 2009 8:36:50 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/freebsd/semfastmutex-r0drv-freebsd.c
r19565 r22579 53 53 /** Magic value (RTSEMFASTMUTEX_MAGIC). */ 54 54 uint32_t u32Magic; 55 /** The FreeBSD (sleep)mutex. */56 struct mtx Mtx;55 /** The FreeBSD shared/exclusive lock mutex. */ 56 struct sx SxLock; 57 57 } RTSEMFASTMUTEXINTERNAL, *PRTSEMFASTMUTEXINTERNAL; 58 58 … … 67 67 { 68 68 pFastInt->u32Magic = RTSEMFASTMUTEX_MAGIC; 69 mtx_init(&pFastInt->Mtx, "IPRT Fast Mutex Semaphore", NULL, MTX_DEF | MTX_RECURSE);69 sx_init(&pFastInt->SxLock, "IPRT Fast Mutex Semaphore"); 70 70 *pMutexSem = pFastInt; 71 71 return VINF_SUCCESS; … … 86 86 87 87 ASMAtomicXchgU32(&pFastInt->u32Magic, RTSEMFASTMUTEX_MAGIC_DEAD); 88 mtx_destroy(&pFastInt->Mtx);88 sx_destroy(&pFastInt->SxLock); 89 89 RTMemFree(pFastInt); 90 90 … … 101 101 VERR_INVALID_PARAMETER); 102 102 103 mtx_lock(&pFastInt->Mtx);103 sx_xlock(&pFastInt->SxLock); 104 104 return VINF_SUCCESS; 105 105 } … … 114 114 VERR_INVALID_PARAMETER); 115 115 116 mtx_unlock(&pFastInt->Mtx);116 sx_xunlock(&pFastInt->SxLock); 117 117 return VINF_SUCCESS; 118 118 }
Note:
See TracChangeset
for help on using the changeset viewer.