VirtualBox

Ignore:
Timestamp:
Feb 13, 2009 3:08:22 PM (16 years ago)
Author:
vboxsync
Message:

#2957: Cleanup of minor glitches.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetAdapter-darwin.cpp

    r16740 r16741  
    11/* $Id$ */
    22/** @file
    3  * VBoxTAP - Network TAP Driver (Host), Darwin Specific Code.
     3 * VBoxNetAdapter - Virtual Network Adapter Driver (Host), Darwin Specific Code.
    44 */
    55
     
    174174    PVBOXNETADA pAda = VBOXNETADA_FROM_IFACE(pIface);
    175175    Assert(pAda);
    176     Log(("vboxNetAdaDetach: Signaling detach to vboxNetAdaUnregisterDevice.\n"));
     176    Log2(("vboxNetAdaDetach: Signaling detach to vboxNetAdaUnregisterDevice.\n"));
    177177    /* Let vboxNetAdaUnregisterDevice know that the interface has been detached. */
    178178    RTSemEventSignal(pAda->hEvtDetached);
     
    245245        if (pAda->aAttachedFamilies[i])
    246246            ifnet_detach_protocol(pAda->pIface, pAda->aAttachedFamilies[i]);
    247     /*
    248      * We acquire the lock twice: before and after ifnet_detach.
    249      * The second attempt to get the lock will block until the lock
    250      * is released in detach callback.
    251      */
    252247    err = ifnet_detach(pAda->pIface);
    253248    if (err)
    254249        Log(("vboxNetAdaUnregisterDevice: Failed to detach interface "
    255250             "(err=%d).\n", err));
    256     Log2(("vboxNetAdaUnregisterDevice: Trying to acquire lock second time.\n"));
     251    Log2(("vboxNetAdaUnregisterDevice: Waiting for 'detached' event...\n"));
     252    /* Wait until we get a signal from detach callback. */
    257253    rc = RTSemEventWait(pAda->hEvtDetached, VBOXNETADA_DETACH_TIMEOUT);
    258254    if (rc == VERR_TIMEOUT)
     
    297293    }
    298294
    299     /* All slots in NETADA array are busy. */
     295    /* All slots in adapter array are busy. */
    300296    return VERR_OUT_OF_RESOURCES;
    301297}
     
    336332        if (RT_FAILURE(rc))
    337333        {
    338             Log(("VBoxNetAdapter: Failed to create fast mutex (rc=%Rrc).\n", rc));
     334            Log(("vboxNetAdaModuleStart: Failed to create fast mutex (rc=%Rrc).\n", rc));
    339335            return rc;
    340336        }
     
    354350        rc = RTSemFastMutexDestroy(g_aAdapters[i].hStateMtx);
    355351        if (RT_FAILURE(rc))
    356             Log(("VBoxNetAdapter: Failed to destroy fast mutex (rc=%Rrc).\n", rc));
     352            Log(("vboxNetAdaModuleStop: Failed to destroy fast mutex (rc=%Rrc).\n", rc));
    357353    }
    358354
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