Changeset 57246 in vbox for trunk/src/VBox/Runtime/r0drv/darwin/semevent-r0drv-darwin.cpp
- Timestamp:
- Aug 7, 2015 7:51:45 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/darwin/semevent-r0drv-darwin.cpp
r57074 r57246 101 101 AssertPtrReturn(phEventSem, VERR_INVALID_POINTER); 102 102 RT_ASSERT_PREEMPTIBLE(); 103 IPRT_DARWIN_SAVE_EFL_AC(); 103 104 104 105 PRTSEMEVENTINTERNAL pThis = (PRTSEMEVENTINTERNAL)RTMemAlloc(sizeof(*pThis)); … … 115 116 { 116 117 *phEventSem = pThis; 118 IPRT_DARWIN_RESTORE_EFL_AC(); 117 119 return VINF_SUCCESS; 118 120 } … … 121 123 RTMemFree(pThis); 122 124 } 125 IPRT_DARWIN_RESTORE_EFL_AC(); 123 126 return VERR_NO_MEMORY; 124 127 } … … 147 150 { 148 151 Assert(pThis->u32Magic != RTSEMEVENT_MAGIC); 152 IPRT_DARWIN_SAVE_EFL_AC(); 153 149 154 lck_spin_destroy(pThis->pSpinlock, g_pDarwinLockGroup); 150 155 RTMemFree(pThis); 156 157 IPRT_DARWIN_RESTORE_EFL_AC(); 151 158 } 152 159 } … … 160 167 AssertMsgReturn(pThis->u32Magic == RTSEMEVENT_MAGIC, ("pThis=%p u32Magic=%#x\n", pThis, pThis->u32Magic), VERR_INVALID_HANDLE); 161 168 RT_ASSERT_INTS_ON(); 169 IPRT_DARWIN_SAVE_EFL_AC(); 162 170 163 171 lck_spin_lock(pThis->pSpinlock); … … 177 185 rtR0SemEventDarwinRelease(pThis); 178 186 187 IPRT_DARWIN_RESTORE_EFL_AC(); 179 188 return VINF_SUCCESS; 180 189 } … … 190 199 RT_ASSERT_PREEMPT_CPUID_VAR(); 191 200 RT_ASSERT_INTS_ON(); 201 IPRT_DARWIN_SAVE_EFL_AC(); 192 202 193 203 rtR0SemEventDarwinRetain(pThis); … … 218 228 219 229 RT_ASSERT_PREEMPT_CPUID(); 230 IPRT_DARWIN_RESTORE_EFL_AC(); 220 231 return VINF_SUCCESS; 221 232 } … … 240 251 AssertMsgReturn(pThis->u32Magic == RTSEMEVENT_MAGIC, ("%p u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_PARAMETER); 241 252 AssertReturn(RTSEMWAIT_FLAGS_ARE_VALID(fFlags), VERR_INVALID_PARAMETER); 253 IPRT_DARWIN_SAVE_EFL_AC(); 242 254 243 255 rtR0SemEventDarwinRetain(pThis); … … 308 320 */ 309 321 ASMAtomicWriteBool(&pThis->fHaveBlockedThreads, true); 310 IPRT_DARWIN_SAVE_EFL_AC();311 322 wait_interrupt_t fInterruptible = fFlags & RTSEMWAIT_FLAGS_INTERRUPTIBLE ? THREAD_ABORTSAFE : THREAD_UNINT; 312 323 wait_result_t rcWait; … … 320 331 (event_t)&Waiter, fInterruptible, u64AbsTime); 321 332 } 322 IPRT_DARWIN_RESTORE_EFL_AC();323 333 324 334 /* … … 370 380 lck_spin_unlock(pThis->pSpinlock); 371 381 rtR0SemEventDarwinRelease(pThis); 382 IPRT_DARWIN_RESTORE_EFL_AC(); 372 383 return rc; 373 384 }
Note:
See TracChangeset
for help on using the changeset viewer.