Changeset 50379 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp
- Timestamp:
- Feb 10, 2014 10:22:43 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp
r50322 r50379 885 885 886 886 887 /** A worker for vboxNetFltSendDummy() thread. */888 static int vboxNetFltSendDummyWorker(RTTHREADThreadSelf, void *pvUser)887 /** A worker thread for vboxNetFltSendDummy(). */ 888 static DECLCALLBACK(int) vboxNetFltSendDummyWorker(RTTHREAD hThreadSelf, void *pvUser) 889 889 { 890 890 Assert(pvUser); … … 893 893 } 894 894 895 /* 895 896 /** 896 897 * Prevent GUI icon freeze issue when VirtualBoxVM process terminates. 897 898 * 898 * This function is a workaround for stuck-in-dock issue. The 899 * idea here is to send a dummy packet to an interface from the 900 * context of a kernel thread. Therefore, an XNU's receive 901 * thread (which is created as a result if we are the first who 902 * is communicating with the interface) will be associated with the 903 * kernel thread instead of VirtualBoxVM process. 899 * This function is a workaround for stuck-in-dock issue. The idea here is to 900 * send a dummy packet to an interface from the context of a kernel thread. 901 * Therefore, an XNU's receive thread (which is created as a result if we are 902 * the first who is communicating with the interface) will be associated with 903 * the kernel thread instead of VirtualBoxVM process. 904 904 * 905 905 * @param pIfNet Interface to be used to send data. … … 907 907 static void vboxNetFltSendDummy(ifnet_t pIfNet) 908 908 { 909 RTTHREAD dummyThread; 910 int rc; 911 912 rc = RTThreadCreate(&dummyThread, vboxNetFltSendDummyWorker, (void *)pIfNet, 0, 913 RTTHREADTYPE_DEFAULT, RTTHREADFLAGS_WAITABLE, "DummyThread"); 914 909 RTTHREAD hThread; 910 int rc = RTThreadCreate(&hThread, vboxNetFltSendDummyWorker, (void *)pIfNet, 0, 911 RTTHREADTYPE_DEFAULT, RTTHREADFLAGS_WAITABLE, "DummyThread"); 915 912 if (RT_SUCCESS(rc)) 916 913 { 917 RTThreadWait( dummyThread, RT_INDEFINITE_WAIT, NULL);914 RTThreadWait(hThread, RT_INDEFINITE_WAIT, NULL); 918 915 LogFlow(("vboxNetFltSendDummy: a dummy packet has been successfully sent in order to prevent stuck-in-dock issue\n")); 919 916 } … … 921 918 LogFlow(("vboxNetFltSendDummy: unable to send dummy packet in order to prevent stuck-in-dock issue\n")); 922 919 } 920 923 921 924 922 /** … … 957 955 RTSpinlockReleaseNoInts(pThis->hSpinlock); 958 956 959 /* Prevent stuck-in-dock issue by associating interface receive thread with kernel thread */957 /* Prevent stuck-in-dock issue by associating interface receive thread with kernel thread. */ 960 958 vboxNetFltSendDummy(pIfNet); 961 959
Note:
See TracChangeset
for help on using the changeset viewer.