Changeset 40806 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin
- Timestamp:
- Apr 6, 2012 9:05:19 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 77321
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp
r38485 r40806 227 227 DECLINLINE(ifnet_t) vboxNetFltDarwinRetainIfNet(PVBOXNETFLTINS pThis) 228 228 { 229 RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;230 229 ifnet_t pIfNet = NULL; 231 230 … … 233 232 * Be careful here to avoid problems racing the detached callback. 234 233 */ 235 RTSpinlockAcquire NoInts(pThis->hSpinlock, &Tmp);234 RTSpinlockAcquire(pThis->hSpinlock); 236 235 if (!ASMAtomicUoReadBool(&pThis->fDisconnectedFromHost)) 237 236 { … … 240 239 ifnet_reference(pIfNet); 241 240 } 242 RTSpinlockReleaseNoInts(pThis->hSpinlock , &Tmp);241 RTSpinlockReleaseNoInts(pThis->hSpinlock); 243 242 244 243 return pIfNet; … … 639 638 { 640 639 PVBOXNETFLTINS pThis = (PVBOXNETFLTINS)pvThis; 641 RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;642 640 uint64_t NanoTS = RTTimeSystemNanoTS(); 643 641 LogFlow(("vboxNetFltDarwinIffDetached: pThis=%p NanoTS=%RU64 (%d)\n", … … 658 656 * behind it in order to avoid problematic races with the detached callback. 659 657 */ 660 RTSpinlockAcquire NoInts(pThis->hSpinlock, &Tmp);658 RTSpinlockAcquire(pThis->hSpinlock); 661 659 662 660 pIfNet = ASMAtomicUoReadPtrT(&pThis->u.s.pIfNet, ifnet_t); … … 671 669 ASMAtomicWriteBool(&pThis->fDisconnectedFromHost, true); 672 670 673 RTSpinlockReleaseNoInts(pThis->hSpinlock , &Tmp);671 RTSpinlockReleaseNoInts(pThis->hSpinlock); 674 672 675 673 if (pIfNet) … … 916 914 } 917 915 918 RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER; 919 RTSpinlockAcquireNoInts(pThis->hSpinlock, &Tmp); 916 RTSpinlockAcquire(pThis->hSpinlock); 920 917 ASMAtomicUoWritePtr(&pThis->u.s.pIfNet, pIfNet); 921 RTSpinlockReleaseNoInts(pThis->hSpinlock , &Tmp);918 RTSpinlockReleaseNoInts(pThis->hSpinlock); 922 919 923 920 /* … … 943 940 Assert(err || pIfFilter); 944 941 945 RTSpinlockAcquire NoInts(pThis->hSpinlock, &Tmp);942 RTSpinlockAcquire(pThis->hSpinlock); 946 943 pIfNet = ASMAtomicUoReadPtrT(&pThis->u.s.pIfNet, ifnet_t); 947 944 if (pIfNet && !err) … … 951 948 pIfNet = NULL; /* don't dereference it */ 952 949 } 953 RTSpinlockReleaseNoInts(pThis->hSpinlock , &Tmp);950 RTSpinlockReleaseNoInts(pThis->hSpinlock); 954 951 955 952 /* Report capabilities. */ … … 1163 1160 void vboxNetFltOsDeleteInstance(PVBOXNETFLTINS pThis) 1164 1161 { 1165 RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;1166 1162 interface_filter_t pIfFilter; 1167 1163 … … 1169 1165 * Carefully obtain the interface filter reference and detach it. 1170 1166 */ 1171 RTSpinlockAcquire NoInts(pThis->hSpinlock, &Tmp);1167 RTSpinlockAcquire(pThis->hSpinlock); 1172 1168 pIfFilter = ASMAtomicUoReadPtrT(&pThis->u.s.pIfFilter, interface_filter_t); 1173 1169 if (pIfFilter) 1174 1170 ASMAtomicUoWriteNullPtr(&pThis->u.s.pIfFilter); 1175 RTSpinlockReleaseNoInts(pThis->hSpinlock , &Tmp);1171 RTSpinlockReleaseNoInts(pThis->hSpinlock); 1176 1172 1177 1173 if (pIfFilter)
Note:
See TracChangeset
for help on using the changeset viewer.