Changeset 6775 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Feb 4, 2008 7:53:23 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c
r6774 r6775 157 157 /** VMMDev Version. */ 158 158 uint32_t u32Version; 159 /** Interrupt handle vector */159 /** Pointer to the interrupt handle vector */ 160 160 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; 163 163 #ifndef USE_SESSION_HASH 164 164 /** Pointer to the session handle. */ … … 870 870 if (rc == DDI_SUCCESS) 871 871 { 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)); 875 874 if (pState->pIntr) 876 875 { … … 880 879 && IntrAllocated > 0) 881 880 { 882 pState->cIntr = IntrAllocated;881 pState->cIntrAllocated = IntrAllocated; 883 882 uint_t uIntrPriority; 884 883 rc = ddi_intr_get_pri(pState->pIntr[0], &uIntrPriority); … … 914 913 915 914 /* 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++) 917 916 ddi_intr_free(pState->pIntr[k]); 918 917 } … … 955 954 mutex_destroy(&pState->Mtx); 956 955 #else 957 for (int i = 0; i < pState->cIntr ; i++)956 for (int i = 0; i < pState->cIntrAllocated; i++) 958 957 { 959 958 int rc = ddi_intr_disable(pState->pIntr[i]); … … 985 984 mutex_exit(&pState->Mtx); 986 985 987 return fOurIRQ ? DDI_INTR_CLAIMED : DDI_INTR_ CLAIMED;986 return fOurIRQ ? DDI_INTR_CLAIMED : DDI_INTR_UNCLAIMED; 988 987 } 989 988
Note:
See TracChangeset
for help on using the changeset viewer.