Changeset 21933 in vbox for trunk/src/VBox
- Timestamp:
- Aug 2, 2009 6:03:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/generic/semspinmutex-r0drv-generic.c
r21593 r21933 123 123 if (!pThis) 124 124 return VERR_NO_MEMORY; 125 pThis->u32Magic = RTSEMSPINMUTEX_MAGIC;126 pThis->fFlags = fFlags;127 pThis->hOwner = NIL_RTNATIVETHREAD;128 pThis->cLockers = 0;125 pThis->u32Magic = RTSEMSPINMUTEX_MAGIC; 126 pThis->fFlags = fFlags; 127 pThis->hOwner = NIL_RTNATIVETHREAD; 128 pThis->cLockers = 0; 129 129 rc = RTSemEventCreate(&pThis->hEventSem); 130 130 if (RT_SUCCESS(rc)) … … 150 150 static int rtSemSpinMutexEnter(RTSEMSPINMUTEXSTATE *pState, RTSEMSPINMUTEXINTERNAL *pThis) 151 151 { 152 int rc = VINF_SUCCESS; 152 #ifndef RT_OS_WINDOWS 153 RTTHREADPREEMPTSTATE const StateInit = RTTHREADPREEMPTSTATE_INITIALIZER; 154 #endif 155 int rc = VINF_SUCCESS; 153 156 154 157 /** @todo Later #1: When entering in interrupt context and we're not able to … … 192 195 pState->fSpin = true; 193 196 } 197 pState->PreemptState = StateInit; 194 198 RTThreadPreemptDisable(&pState->PreemptState); 195 199 … … 202 206 return VERR_SEM_BAD_CONTEXT; 203 207 pState->fSpin = !RTThreadPreemptIsEnabled(NIL_RTTHREAD); 208 pState->PreemptState = StateInit; 204 209 RTThreadPreemptDisable(&pState->PreemptState); 205 210 #endif
Note:
See TracChangeset
for help on using the changeset viewer.