VirtualBox

Changeset 5697 in vbox


Ignore:
Timestamp:
Nov 12, 2007 4:49:50 AM (17 years ago)
Author:
vboxsync
Message:

Solaris: protect the GIP using the GIP mutex during suspend/resume.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c

    r5678 r5697  
    3636
    3737#include "SUPDRV.h"
     38#include <iprt/semaphore.h>
    3839#include <iprt/spinlock.h>
    3940#include <iprt/process.h>
     
    296297        case DDI_RESUME:
    297298        {
    298             int rc = RTTimerStart(g_DevExt.pGipTimer, 0);
    299             AssertRC(rc);
     299            RTSemFastMutexRequest(g_DevExt.mtxGip);
     300            if (g_DevExt.pGipTimer)
     301                RTTimerStart(g_DevExt.pGipTimer, 0);
     302
     303            RTSemFastMutexRelease(g_DevExt.mtxGip);
    300304            return DDI_SUCCESS;
    301305        }
     
    351355        case DDI_SUSPEND:
    352356        {
    353             int rc = RTTimerStop(g_DevExt.pGipTimer);
    354             AssertRC(rc);
     357            RTSemFastMutexRequest(g_DevExt.mtxGip);
     358            if (g_DevExt.pGipTimer && g_DevExt.cGipUsers > 0)
     359                RTTimerStop(g_DevExt.pGipTimer);
     360
     361            RTSemFastMutexRelease(g_DevExt.mtxGip);
    355362            return DDI_SUCCESS;
    356363        }
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