Changeset 27339 in vbox for trunk/src/VBox/Devices/Graphics/HGSMI
- Timestamp:
- Mar 12, 2010 5:44:11 PM (15 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics/HGSMI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHostHlp.h
r26969 r27339 40 40 41 41 void hgsmiListAppend (HGSMILIST *pList, HGSMILISTENTRY *pEntry); 42 DECLINLINE(void) hgsmiListPrepend (HGSMILIST *pList, HGSMILISTENTRY *pEntry) 43 { 44 HGSMILISTENTRY * pHead = pList->pHead; 45 pList->pHead = pEntry; 46 pEntry->pNext = pHead; 47 if (!pHead) 48 pList->pTail = pEntry; 49 } 50 42 51 void hgsmiListRemove (HGSMILIST *pList, HGSMILISTENTRY *pEntry, HGSMILISTENTRY *pPrev); 43 52 … … 63 72 HGSMILISTENTRY * hgsmiListRemoveAll (HGSMILIST *pList, HGSMILISTENTRY ** ppTail /* optional */); 64 73 74 DECLINLINE(void) hgsmiListAppendAll (HGSMILIST *pList, HGSMILISTENTRY *pHead, HGSMILISTENTRY *pTail) 75 { 76 if(hgsmiListIsEmpty (pList)) 77 { 78 pList->pHead = pHead; 79 pList->pTail = pTail; 80 } 81 else 82 { 83 pList->pTail->pNext = pHead; 84 pList->pTail = pTail; 85 } 86 } 87 88 DECLINLINE(void) hgsmiListPrependAll (HGSMILIST *pList, HGSMILISTENTRY *pHead, HGSMILISTENTRY *pTail) 89 { 90 HGSMILISTENTRY *pOldHead = pList->pHead; 91 if(!pOldHead) 92 { 93 pList->pHead = pHead; 94 pList->pTail = pTail; 95 } 96 else 97 { 98 pList->pHead = pHead; 99 pTail->pNext = pOldHead; 100 } 101 } 102 103 DECLINLINE(void) hgsmiListCat (HGSMILIST *pList, HGSMILIST *pList2) 104 { 105 hgsmiListAppendAll (pList, pList2->pHead, pList2->pTail); 106 hgsmiListInit (pList2); 107 } 108 109 DECLINLINE(void) hgsmiListPrepCat (HGSMILIST *pList, HGSMILIST *pList2) 110 { 111 hgsmiListPrependAll (pList, pList2->pHead, pList2->pTail); 112 hgsmiListInit (pList2); 113 } 114 65 115 66 116 #endif /* !__HGSMIHostHlp_h__*/ -
trunk/src/VBox/Devices/Graphics/HGSMI/SHGSMIHost.cpp
r26969 r27339 40 40 } 41 41 42 int VBoxSHGSMICommandComplete Asynch(PHGSMIINSTANCE pIns, void *pvData)42 int VBoxSHGSMICommandComplete (PHGSMIINSTANCE pIns, void *pvData) 43 43 { 44 44 PVBOXSHGSMIHEADER pHdr = VBoxSHGSMIBufferHeader (pvData); 45 Assert(!!(pHdr->fFlags & VBOXSHGSMI_FLAG_HG_ASYNCH)); 46 return vboxSHGSMICommandCompleteAsynch (pIns, pHdr); 47 } 48 49 int VBoxSHGSMICommandCompleteSynch (PHGSMIINSTANCE pIns, void *pvData) 50 { 51 PVBOXSHGSMIHEADER pHdr = VBoxSHGSMIBufferHeader (pvData); 52 Assert(!(pHdr->fFlags & VBOXSHGSMI_FLAG_HG_ASYNCH)); 53 if (vboxSHGSMICommandCanCompleteSynch(pHdr)) 45 if (!(pHdr->fFlags & VBOXSHGSMI_FLAG_HG_ASYNCH) /* <- check if synchronous completion */ 46 && vboxSHGSMICommandCanCompleteSynch(pHdr)) /* <- check if can complete synchronously */ 54 47 return VINF_SUCCESS; 55 48 pHdr->fFlags |= VBOXSHGSMI_FLAG_HG_ASYNCH; -
trunk/src/VBox/Devices/Graphics/HGSMI/SHGSMIHost.h
r26969 r27339 19 19 #include "HGSMIHost.h" 20 20 21 int VBoxSHGSMICommandComplete Asynch(PHGSMIINSTANCE pIns, void *pvData);21 int VBoxSHGSMICommandComplete (PHGSMIINSTANCE pIns, void *pvData); 22 22 23 23 void VBoxSHGSMICommandMarkAsynchCompletion (void *pvData); 24 24 25 int VBoxSHGSMICommandCompleteSynch (PHGSMIINSTANCE pIns, void *pvData);26 27 25 #endif /* #ifndef ___SHGSMIHost_h___ */
Note:
See TracChangeset
for help on using the changeset viewer.