VirtualBox

Ignore:
Timestamp:
Oct 1, 2015 5:53:32 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103011
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.

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