VirtualBox

Changeset 18383 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Mar 27, 2009 12:24:05 PM (16 years ago)
Author:
vboxsync
Message:

PCNet: don't block if we can't enter the critical section from pcnetTimer()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r15006 r18383  
    37473747    int         rc;
    37483748
    3749     STAM_PROFILE_ADV_START(&pThis->StatTimer, a);
    3750     rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
    3751     AssertReleaseRC(rc);
    3752 
    3753     pcnetPollTimer(pThis);
    3754 
    3755     PDMCritSectLeave(&pThis->CritSect);
    3756     STAM_PROFILE_ADV_STOP(&pThis->StatTimer, a);
     3749    /*
     3750     * Don't block if we cannot enter here.
     3751     */
     3752    rc = PDMR3CritSectTryEnter(&pThis->CritSect);
     3753    if (RT_SUCCESS(rc))
     3754    {
     3755        STAM_PROFILE_ADV_START(&pThis->StatTimer, a);
     3756        pcnetPollTimer(pThis);
     3757        PDMCritSectLeave(&pThis->CritSect);
     3758        STAM_PROFILE_ADV_STOP(&pThis->StatTimer, a);
     3759    }
    37573760}
    37583761
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