VirtualBox

Changeset 45188 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 26, 2013 9:30:23 AM (12 years ago)
Author:
vboxsync
Message:

SUPDrv: IRQ safe SUPSem* handling.

Location:
trunk/src/VBox/HostDrivers/Support
Files:
2 edited

Legend:

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

    r44188 r45188  
    55
    66/*
    7  * Copyright (C) 2006-2012 Oracle Corporation
     7 * Copyright (C) 2006-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    456456     */
    457457    memset(pDevExt, 0, sizeof(*pDevExt));
    458     rc = RTSpinlockCreate(&pDevExt->Spinlock, RTSPINLOCK_FLAGS_INTERRUPT_UNSAFE, "SUPDrvDevExt");
     458    rc = RTSpinlockCreate(&pDevExt->Spinlock, RTSPINLOCK_FLAGS_INTERRUPT_SAFE, "SUPDrvDevExt");
    459459    if (RT_SUCCESS(rc))
    460460    {
     
    683683        {
    684684            rc = RTHandleTableCreateEx(&pSession->hHandleTable,
    685                                        RTHANDLETABLE_FLAGS_LOCKED | RTHANDLETABLE_FLAGS_CONTEXT,
     685                                       RTHANDLETABLE_FLAGS_LOCKED_IRQ_SAFE | RTHANDLETABLE_FLAGS_CONTEXT,
    686686                                       1 /*uBase*/, 32768 /*cMax*/, supdrvSessionObjHandleRetain, pSession);
    687687            if (RT_SUCCESS(rc))
  • trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h

    r44528 r45188  
    1 /* $Revision$ */
     1/* $Id$ */
    22/** @file
    33 * VirtualBox Support Driver - Internal header.
     
    55
    66/*
    7  * Copyright (C) 2006-2012 Oracle Corporation
     7 * Copyright (C) 2006-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    389389
    390390/** Magic number for SUPDRVOBJ::u32Magic. (Dame Agatha Mary Clarissa Christie). */
    391 #define SUPDRVOBJ_MAGIC             0x18900915
     391#define SUPDRVOBJ_MAGIC             UINT32_C(0x18900915)
    392392/** Dead number magic for SUPDRVOBJ::u32Magic. */
    393 #define SUPDRVOBJ_MAGIC_DEAD        0x19760112
     393#define SUPDRVOBJ_MAGIC_DEAD        UINT32_C(0x19760112)
    394394
    395395/**
     
    423423    PVM                             pVM;
    424424    /** Handle table for IPRT semaphore wrapper APIs.
    425      * Programmable from R0 and R3. */
     425     * This takes care of its own locking in an IRQ safe manner. */
    426426    RTHANDLETABLE                   hHandleTable;
    427427    /** Load usage records. (protected by SUPDRVDEVEXT::mtxLdr) */
     
    494494    uint32_t                        cbSession;
    495495
    496     /** Spinlock to serialize the initialization, usage counting and objects. */
     496    /** Spinlock to serialize the initialization, usage counting and objects.
     497     * This is IRQ safe because we want to be able signal semaphores from the
     498     * special HM context (and later maybe interrupt handlers), so we must be able
     499     * to reference and dereference handles when IRQs are disabled. */
    497500    RTSPINLOCK                      Spinlock;
    498501
     
    542545    RTSEMFASTMUTEX                  mtxGip;
    543546#endif
    544     /** GIP spinlock protecting GIP members during Mp events. */
     547    /** GIP spinlock protecting GIP members during Mp events.
     548     * This is IRQ safe since be may get MP callbacks in contexts where IRQs are
     549     * disabled (on some platforms). */
    545550    RTSPINLOCK                      hGipSpinlock;
    546551    /** Pointer to the Global Info Page (GIP). */
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