VirtualBox

Ignore:
Timestamp:
Apr 6, 2012 9:05:19 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
77321
Message:

RTSpinlock: Redid the interface, eliminating NoInts and Tmp. Whether a spinlock is interrupt safe or not is now defined at creation time, preventing stupid bugs arrising from calling the wrong acquire and/or release methods somewhere. The saved flags are stored in the spinlock strucutre, eliminating the annoying Tmp variable. Needs testing on each platform before fixing the build burn.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c

    r37423 r40806  
    581581    struct ifnet *ifp;
    582582    node_p node;
    583     RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;
    584583
    585584    VBOXCURVNET_SET_FROM_UCRED();
     
    593592        return VERR_INTERNAL_ERROR;
    594593
    595     RTSpinlockAcquireNoInts(pThis->hSpinlock, &Tmp);
     594    RTSpinlockAcquire(pThis->hSpinlock);
    596595
    597596    ASMAtomicUoWritePtr(&pThis->u.s.ifp, ifp);
     
    610609    TASK_INIT(&pThis->u.s.tskout, 0, vboxNetFltFreeBSDoutput, pThis);
    611610
    612     RTSpinlockReleaseNoInts(pThis->hSpinlock, &Tmp);
     611    RTSpinlockReleaseNoInts(pThis->hSpinlock);
    613612
    614613    NG_NODE_SET_PRIVATE(node, pThis);
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