Changeset 16741 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin
- Timestamp:
- Feb 13, 2009 3:08:22 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetAdapter-darwin.cpp
r16740 r16741 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox TAP - Network TAPDriver (Host), Darwin Specific Code.3 * VBoxNetAdapter - Virtual Network Adapter Driver (Host), Darwin Specific Code. 4 4 */ 5 5 … … 174 174 PVBOXNETADA pAda = VBOXNETADA_FROM_IFACE(pIface); 175 175 Assert(pAda); 176 Log (("vboxNetAdaDetach: Signaling detach to vboxNetAdaUnregisterDevice.\n"));176 Log2(("vboxNetAdaDetach: Signaling detach to vboxNetAdaUnregisterDevice.\n")); 177 177 /* Let vboxNetAdaUnregisterDevice know that the interface has been detached. */ 178 178 RTSemEventSignal(pAda->hEvtDetached); … … 245 245 if (pAda->aAttachedFamilies[i]) 246 246 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 lock250 * is released in detach callback.251 */252 247 err = ifnet_detach(pAda->pIface); 253 248 if (err) 254 249 Log(("vboxNetAdaUnregisterDevice: Failed to detach interface " 255 250 "(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. */ 257 253 rc = RTSemEventWait(pAda->hEvtDetached, VBOXNETADA_DETACH_TIMEOUT); 258 254 if (rc == VERR_TIMEOUT) … … 297 293 } 298 294 299 /* All slots in NETADAarray are busy. */295 /* All slots in adapter array are busy. */ 300 296 return VERR_OUT_OF_RESOURCES; 301 297 } … … 336 332 if (RT_FAILURE(rc)) 337 333 { 338 Log((" VBoxNetAdapter: Failed to create fast mutex (rc=%Rrc).\n", rc));334 Log(("vboxNetAdaModuleStart: Failed to create fast mutex (rc=%Rrc).\n", rc)); 339 335 return rc; 340 336 } … … 354 350 rc = RTSemFastMutexDestroy(g_aAdapters[i].hStateMtx); 355 351 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)); 357 353 } 358 354
Note:
See TracChangeset
for help on using the changeset viewer.