VirtualBox

Changeset 6775 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Feb 4, 2008 7:53:23 AM (17 years ago)
Author:
vboxsync
Message:

Solaris vboxguest: Fix and cleanups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c

    r6774 r6775  
    157157    /** VMMDev Version. */
    158158    uint32_t                u32Version;
    159     /** Interrupt handle vector */
     159    /** Pointer to the interrupt handle vector */
    160160    ddi_intr_handle_t       *pIntr;
    161     /** Number of interrupt handles */
    162     size_t                  cIntr;
     161    /** Number of actually allocated interrupt handles */
     162    size_t                  cIntrAllocated;
    163163#ifndef USE_SESSION_HASH
    164164    /** Pointer to the session handle. */
     
    870870                if (rc == DDI_SUCCESS)
    871871                {
    872                     /* Allocated kernel memory for the interrupt handles. */
    873                     pState->cIntr = IntrCount;
    874                     pState->pIntr = RTMemAlloc(pState->cIntr * sizeof(ddi_intr_handle_t));
     872                    /* Allocated kernel memory for the interrupt handles. The allocation size is stored internally. */
     873                    pState->pIntr = RTMemAlloc(IntrCount * sizeof(ddi_intr_handle_t));
    875874                    if (pState->pIntr)
    876875                    {
     
    880879                            && IntrAllocated > 0)
    881880                        {
    882                             pState->cIntr = IntrAllocated;
     881                            pState->cIntrAllocated = IntrAllocated;
    883882                            uint_t uIntrPriority;
    884883                            rc = ddi_intr_get_pri(pState->pIntr[0], &uIntrPriority);
     
    914913
    915914                            /* Remove allocated IRQs, too bad we can free only one handle at a time. */
    916                             for (int k = 0; k < pState->cIntr; k++)
     915                            for (int k = 0; k < pState->cIntrAllocated; k++)
    917916                                ddi_intr_free(pState->pIntr[k]);
    918917                        }
     
    955954    mutex_destroy(&pState->Mtx);
    956955#else
    957     for (int i = 0; i < pState->cIntr; i++)
     956    for (int i = 0; i < pState->cIntrAllocated; i++)
    958957    {
    959958        int rc = ddi_intr_disable(pState->pIntr[i]);
     
    985984    mutex_exit(&pState->Mtx);
    986985
    987     return fOurIRQ ? DDI_INTR_CLAIMED : DDI_INTR_CLAIMED;
     986    return fOurIRQ ? DDI_INTR_CLAIMED : DDI_INTR_UNCLAIMED;
    988987}
    989988
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