VirtualBox

Changeset 75704 in vbox for trunk/src/VBox/Runtime/r0drv


Ignore:
Timestamp:
Nov 25, 2018 1:44:09 AM (6 years ago)
Author:
vboxsync
Message:

IPRT/r0drv/darwin: RTSemEventSignal and RTSemEventMultiSignal seems to work fine with interrupts disabled and/or from interrupt context. bugref:4686

Location:
trunk/src/VBox/Runtime/r0drv/darwin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/darwin/semevent-r0drv-darwin.cpp

    r69111 r75704  
    199199                    VERR_INVALID_HANDLE);
    200200    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.
    202209    IPRT_DARWIN_SAVE_EFL_AC();
    203210
     
    229236
    230237    RT_ASSERT_PREEMPT_CPUID();
     238    AssertMsg((fSavedEfl & X86_EFL_IF) == (ASMGetFlags() & X86_EFL_IF), ("fSavedEfl=%#x cur=%#x\n",(uint32_t)fSavedEfl, ASMGetFlags()));
    231239    IPRT_DARWIN_RESTORE_EFL_AC();
    232240    return VINF_SUCCESS;
  • trunk/src/VBox/Runtime/r0drv/darwin/semeventmulti-r0drv-darwin.cpp

    r69111 r75704  
    199199    AssertMsgReturn(pThis->u32Magic == RTSEMEVENTMULTI_MAGIC, ("pThis=%p u32Magic=%#x\n", pThis, pThis->u32Magic), VERR_INVALID_HANDLE);
    200200    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
    202210    IPRT_DARWIN_SAVE_EFL_AC();
    203211
     
    226234
    227235    RT_ASSERT_PREEMPT_CPUID();
     236    AssertMsg((fSavedEfl & X86_EFL_IF) == (ASMGetFlags() & X86_EFL_IF), ("fSavedEfl=%#x cur=%#x\n",(uint32_t)fSavedEfl, ASMGetFlags()));
    228237    IPRT_DARWIN_RESTORE_EFL_AC();
    229238    return VINF_SUCCESS;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette