Changeset 75704 in vbox
- Timestamp:
- Nov 25, 2018 1:44:09 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
include/iprt/semaphore.h (modified) (2 diffs)
-
src/VBox/Runtime/r0drv/darwin/semevent-r0drv-darwin.cpp (modified) (2 diffs)
-
src/VBox/Runtime/r0drv/darwin/semeventmulti-r0drv-darwin.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/semaphore.h
r69105 r75704 164 164 * system specific whether it works in interrupt context or with 165 165 * interrupts disabled. 166 * 167 * ring-0/Darwin: This works when interrupts are disabled and thereby 168 * in interrupt context, except it cannot race semaphore destruction as 169 * the allocator does not work under these circumstances. 166 170 */ 167 171 RTDECL(int) RTSemEventSignal(RTSEMEVENT hEventSem); … … 325 329 * system specific whether it works in interrupt context or with 326 330 * interrupts disabled. 331 * 332 * ring-0/Darwin: This works when interrupts are disabled and thereby 333 * in interrupt context, except it cannot race semaphore destruction as 334 * the allocator does not work under these circumstances. 327 335 */ 328 336 RTDECL(int) RTSemEventMultiSignal(RTSEMEVENTMULTI hEventMultiSem); -
trunk/src/VBox/Runtime/r0drv/darwin/semevent-r0drv-darwin.cpp
r69111 r75704 199 199 VERR_INVALID_HANDLE); 200 200 RT_ASSERT_PREEMPT_CPUID_VAR(); 201 RT_ASSERT_INTS_ON(); 201 202 /* 203 * Coming here with interrupts disabled should be okay. The thread_wakeup_prim KPI is used 204 * by the interrupt handler IOFilterInterruptEventSource::disableInterruptOccurred() via 205 * signalWorkAvailable(). The only problem is if we have to destroy the event structure, 206 * as RTMemFree does not work with interrupts disabled (IOFree/kfree takes zone mutex). 207 */ 208 //RT_ASSERT_INTS_ON(); - we may be called from interrupt context, which seems to be perfectly fine. 202 209 IPRT_DARWIN_SAVE_EFL_AC(); 203 210 … … 229 236 230 237 RT_ASSERT_PREEMPT_CPUID(); 238 AssertMsg((fSavedEfl & X86_EFL_IF) == (ASMGetFlags() & X86_EFL_IF), ("fSavedEfl=%#x cur=%#x\n",(uint32_t)fSavedEfl, ASMGetFlags())); 231 239 IPRT_DARWIN_RESTORE_EFL_AC(); 232 240 return VINF_SUCCESS; -
trunk/src/VBox/Runtime/r0drv/darwin/semeventmulti-r0drv-darwin.cpp
r69111 r75704 199 199 AssertMsgReturn(pThis->u32Magic == RTSEMEVENTMULTI_MAGIC, ("pThis=%p u32Magic=%#x\n", pThis, pThis->u32Magic), VERR_INVALID_HANDLE); 200 200 RT_ASSERT_PREEMPT_CPUID_VAR(); 201 RT_ASSERT_INTS_ON(); 201 202 /* 203 * Coming here with interrupts disabled should be okay. The thread_wakeup_prim KPI is used 204 * by the interrupt handler IOFilterInterruptEventSource::disableInterruptOccurred() via 205 * signalWorkAvailable(). The only problem is if we have to destroy the event structure, 206 * as RTMemFree does not work with interrupts disabled (IOFree/kfree takes zone mutex). 207 */ 208 //RT_ASSERT_INTS_ON(); - we may be called from interrupt context, which seems to be perfectly fine. 209 202 210 IPRT_DARWIN_SAVE_EFL_AC(); 203 211 … … 226 234 227 235 RT_ASSERT_PREEMPT_CPUID(); 236 AssertMsg((fSavedEfl & X86_EFL_IF) == (ASMGetFlags() & X86_EFL_IF), ("fSavedEfl=%#x cur=%#x\n",(uint32_t)fSavedEfl, ASMGetFlags())); 228 237 IPRT_DARWIN_RESTORE_EFL_AC(); 229 238 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.

