VirtualBox

Changeset 50688 in vbox


Ignore:
Timestamp:
Mar 4, 2014 11:11:39 PM (11 years ago)
Author:
vboxsync
Message:

VBoxGuest/darwin: Delay waking up threads still we're out of interrupt handler context, or we'll trip up in the even semaphore wake up code.

Location:
trunk/src/VBox/Additions/common/VBoxGuest
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-darwin.cpp

    r48034 r50688  
    650650
    651651/**
    652  * Just a plug
     652 * Perform pending wake ups in work loop context.
    653653 */
    654654static void
    655 interruptHandler(OSObject *pOwner, IOInterruptEventSource *pSrc, int cInts)
    656 {
    657     NOREF(pOwner);
    658     NOREF(pSrc);
    659     NOREF(cInts);
     655deferredInterruptHandler(OSObject *pOwner, IOInterruptEventSource *pSrc, int cInts)
     656{
     657    NOREF(pOwner); NOREF(pSrc); NOREF(cInts);
     658
     659    VBoxGuestWaitDoWakeUps(&g_DevExt);
    660660}
    661661
     
    664664 */
    665665static bool
    666 checkForInterrupt(OSObject *pOwner, IOFilterInterruptEventSource *pSrc)
     666directInterruptHandler(OSObject *pOwner, IOFilterInterruptEventSource *pSrc)
    667667{
    668668    if (!pSrc)
     
    670670
    671671    bool fTaken = VBoxGuestCommonISR(&g_DevExt);
    672     if (!fTaken)
     672    if (!fTaken) /** @todo r=bird: This looks bogus as we might actually be sharing interrupts with someone. */
    673673        printf("VBoxGuestCommonISR error\n");
    674674
     
    685685
    686686    m_pInterruptSrc = IOFilterInterruptEventSource::filterInterruptEventSource(this,
    687                                                                                &interruptHandler,
    688                                                                                &checkForInterrupt,
     687                                                                               &deferredInterruptHandler,
     688                                                                               &directInterruptHandler,
    689689                                                                               pProvider);
    690690
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp

    r50623 r50688  
    30893089    RTSpinlockReleaseNoInts(pDevExt->EventSpinlock);
    30903090
    3091 #if defined(VBOXGUEST_USE_DEFERRED_WAKE_UP) && !defined(RT_OS_WINDOWS)
     3091#if defined(VBOXGUEST_USE_DEFERRED_WAKE_UP) && !defined(RT_OS_DARWIN) && !defined(RT_OS_WINDOWS)
    30923092    /*
    30933093     * Do wake-ups.
    30943094     * Note. On Windows this isn't possible at this IRQL, so a DPC will take
    3095      *       care of it.
     3095     *       care of it.  Same on darwin, doing it in the work loop callback.
    30963096     */
    30973097    VBoxGuestWaitDoWakeUps(pDevExt);
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h

    r50537 r50688  
    3838/** @def VBOXGUEST_USE_WAKE_UP_LIST
    3939 * Defer wake-up of waiting thread when defined. */
    40 #if defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS) || defined(DOXYGEN_RUNNING)
     40#if defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS) || defined(DOXYGEN_RUNNING)
    4141# define VBOXGUEST_USE_DEFERRED_WAKE_UP
    4242#endif
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