VirtualBox

Changeset 57990 in vbox


Ignore:
Timestamp:
Oct 1, 2015 5:53:32 PM (9 years ago)
Author:
vboxsync
Message:

Removed the 'temporary' VBOX_WITH_NEW_USB_CODE_ON_DARWIN define (r29740, 7 years ago).

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r57949 r57990  
    479479# Enable the new async completion manager
    480480VBOX_WITH_PDM_ASYNC_COMPLETION = 1
    481 # Temporary switch for enabling / disabling the new USB code on Darwin.
    482 VBOX_WITH_NEW_USB_CODE_ON_DARWIN = 1
    483481ifdef VBOX_WITH_USB
    484482 VBOX_WITH_VUSB = 1
  • trunk/src/VBox/Devices/Makefile.kmk

    r57989 r57990  
    6969  if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
    7070   VBoxDDU_DEFS          += VBOX_WITH_XHCI_IMPL
    71   endif
    72   ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    73    VBoxDDU_DEFS.darwin   += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    7471  endif
    7572 else
     
    10198 VBoxDDU_LDFLAGS.darwin   = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDDU.dylib
    10299 ifdef VBOX_WITH_USB
    103   ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    104100  VBoxDDU_LDFLAGS.darwin += -framework IOKit
    105   endif
    106101 endif
    107102
     
    325320
    326321  VBoxDD_DEFS.darwin    += VUSB_HAVE_USBPROXY_DEVICE
    327   ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    328    VBoxDD_DEFS.darwin   += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    329   endif
    330322  VBoxDD_SOURCES.darwin += \
    331323        USB/USBProxyDevice.cpp \
  • trunk/src/VBox/Devices/USB/darwin/USBProxyDevice-darwin.cpp

    r57358 r57990  
    11841184    }
    11851185
    1186 #ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    11871186    /*
    11881187     * Call the USBLib init to make sure we're a valid VBoxUSB client.
     
    11921191    if (RT_FAILURE(vrc))
    11931192        LogRel(("USB: USBLibInit failed - %Rrc\n", vrc));
    1194 #endif
    11951193
    11961194    /*
     
    13301328    }
    13311329
    1332 #ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    13331330    USBLibTerm();
    1334 #endif
    13351331    return vrc;
    13361332}
     
    13791375
    13801376    IOReturn irc = (*pDevOsX->ppDevI)->ResetDevice(pDevOsX->ppDevI);
    1381 #ifndef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    1382     if (irc == kIOReturnSuccess)
    1383         irc = (*pDevOsX->ppDevI)->USBDeviceReEnumerate(pDevOsX->ppDevI, 0);
    1384 #endif
    13851377
    13861378    irc = (*pDevOsX->ppDevI)->USBDeviceClose(pDevOsX->ppDevI);
     
    14091401    }
    14101402
    1411 #ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    14121403    USBLibTerm();
    1413 #endif
    14141404    LogFlow(("usbProxyDarwinClose: returns\n"));
    14151405}
  • trunk/src/VBox/Devices/build/VBoxDDUDeps.cpp

    r57358 r57990  
    4444    (PFNRT)UsbOpen,
    4545# endif
    46 # if (defined(RT_OS_DARWIN) && defined(VBOX_WITH_NEW_USB_CODE_ON_DARWIN)) \
    47   || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS) /* PORTME */
     46# if defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS) /* PORTME */
    4847    (PFNRT)USBLibInit,
    4948# endif
  • trunk/src/VBox/Main/include/USBProxyService.h

    r53062 r57990  
    154154    ~USBProxyServiceDarwin();
    155155
    156 #ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    157156    virtual void *insertFilter(PCUSBFILTER aFilter);
    158157    virtual void removeFilter(void *aId);
    159 #endif
    160158
    161159    virtual int captureDevice(HostUSBDevice *aDevice);
     
    183181     * not including newly attached devices. */
    184182    bool mWaitABitNextTime;
    185 #ifndef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    186     /** Whether we've got a fake async event and should return without entering the runloop. */
    187     bool volatile mFakeAsync;
    188 #endif
    189183    /** Whether we've successfully initialized the USBLib and should call USBLibTerm in the destructor. */
    190184    bool mUSBLibInitialized;
  • trunk/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp

    r57475 r57990  
    442442     */
    443443    LogFlowThisFunc(("{%s} capturing the device.\n", mName));
    444 #if (defined(RT_OS_DARWIN) && defined(VBOX_WITH_NEW_USB_CODE_ON_DARWIN)) /* PORTME */ \
    445  || defined(RT_OS_WINDOWS) || defined(RT_OS_SOLARIS)
     444#if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS) || defined(RT_OS_SOLARIS) /* PORTME */
    446445    i_setState(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_UsedByVM, kHostUSBDeviceSubState_AwaitingDetach);
    447446#else
     
    705704     * Try release it.
    706705     */
    707 #if (defined(RT_OS_DARWIN) && defined(VBOX_WITH_NEW_USB_CODE_ON_DARWIN)) /* PORTME */ \
    708  || defined(RT_OS_WINDOWS)
     706#if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS) /* PORTME */
    709707    i_startTransition(kHostUSBDeviceState_ReleasingToHost, kHostUSBDeviceState_Unused, kHostUSBDeviceSubState_AwaitingDetach);
    710708#else
     
    759757     * Do the job.
    760758     */
    761 #if (defined(RT_OS_DARWIN) && defined(VBOX_WITH_NEW_USB_CODE_ON_DARWIN)) /* PORTME */ \
    762  || defined(RT_OS_WINDOWS)
     759#if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS) /* PORTME */
    763760    i_startTransition(kHostUSBDeviceState_Capturing, kHostUSBDeviceState_HeldByProxy, kHostUSBDeviceSubState_AwaitingDetach);
    764761#else
  • trunk/src/VBox/Main/src-server/darwin/USBProxyServiceDarwin.cpp

    r57358 r57990  
    5353HRESULT USBProxyServiceDarwin::init(void)
    5454{
    55 #ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    5655    /*
    5756     * Initialize the USB library.
     
    6463    }
    6564    mUSBLibInitialized = true;
    66 #endif
    6765
    6866    /*
     
    8785        stop();
    8886
    89 #ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    9087    /*
    9188     * Terminate the USB library - it'll
     
    9693        mUSBLibInitialized = false;
    9794    }
    98 #endif
    99 }
    100 
    101 
    102 #ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
     95}
     96
     97
    10398void *USBProxyServiceDarwin::insertFilter(PCUSBFILTER aFilter)
    10499{
     
    111106    USBLibRemoveFilter(aId);
    112107}
    113 #endif /* VBOX_WITH_NEW_USB_CODE_ON_DARWIN */
    114108
    115109
     
    127121    Assert(aDevice->i_getUnistate() == kHostUSBDeviceState_Capturing);
    128122
    129 #ifndef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    130     /*
    131      * Fake it.
    132      */
    133     ASMAtomicWriteBool(&mFakeAsync, true);
    134     devLock.release();
    135     interruptWait();
    136     return VINF_SUCCESS;
    137 
    138 #else
    139123    /*
    140124     * Create a one-shot capture filter for the device (don't
     
    159143    LogFlowThisFunc(("returns %Rrc pvId=%p\n", rc, pvId));
    160144    return rc;
    161 #endif
    162145}
    163146
     
    166149{
    167150    AssertReturnVoid(aDevice->isWriteLockOnCurrentThread());
    168 #ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
     151
    169152    /*
    170153     * Remove the one-shot filter if necessary.
     
    174157        USBLibRemoveFilter(aDevice->mOneShotId);
    175158    aDevice->mOneShotId = NULL;
    176 #endif
    177159}
    178160
     
    191173    Assert(aDevice->i_getUnistate() == kHostUSBDeviceState_ReleasingToHost);
    192174
    193 #ifndef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    194     /*
    195      * Fake it.
    196      */
    197     ASMAtomicWriteBool(&mFakeAsync, true);
    198     devLock.release();
    199     interruptWait();
    200     return VINF_SUCCESS;
    201 
    202 #else
    203175    /*
    204176     * Create a one-shot ignore filter for the device
     
    225197    LogFlowThisFunc(("returns %Rrc pvId=%p\n", rc, pvId));
    226198    return rc;
    227 #endif
    228199}
    229200
     
    232203{
    233204    AssertReturnVoid(aDevice->isWriteLockOnCurrentThread());
    234 #ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
     205
    235206    /*
    236207     * Remove the one-shot filter if necessary.
     
    240211        USBLibRemoveFilter(aDevice->mOneShotId);
    241212    aDevice->mOneShotId = NULL;
    242 #endif
    243213}
    244214
     
    247217void USBProxyServiceDarwin::detachingDevice(HostUSBDevice *aDevice)
    248218{
    249 #ifndef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    250     aDevice->setLogicalReconnect(HostUSBDevice::kDetachingPendingDetach);
    251 #else
    252219    NOREF(aDevice);
    253 #endif
    254220}
    255221
     
    259225    AssertReturn(aDevice, false);
    260226    AssertReturn(!aDevice->isWriteLockOnCurrentThread(), false);
    261 #ifndef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    262     /* We're faking async state stuff. */
    263     return updateDeviceStateFake(aDevice, aUSBDevice, aRunFilters, aIgnoreMachine);
    264 #else
    265     /* Nothing special here so far, so fall back on parent */
     227    /* Nothing special here so far, so fall back on parent. */
    266228    return USBProxyService::updateDeviceState(aDevice, aUSBDevice, aRunFilters, aIgnoreMachine);
    267 #endif
    268229}
    269230
     
    271232int USBProxyServiceDarwin::wait(RTMSINTERVAL aMillies)
    272233{
    273 #ifndef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
    274     if (    mFakeAsync
    275         &&  ASMAtomicXchgBool(&mFakeAsync, false))
    276         return VINF_SUCCESS;
    277 #endif
    278 
    279234    SInt32 rc = CFRunLoopRunInMode(CFSTR(VBOX_IOKIT_MODE_STRING),
    280235                                   mWaitABitNextTime && aMillies >= 1000
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