Lines Matching defs:pEntry

213 static void hgsmiGuestCompletionFIFOFree (HGSMIINSTANCE *pIns, HGSMIGUESTCOMPLENTRY *pEntry)
216 RTMemFree (pEntry);
225 HGSMIGUESTCOMPLENTRY *pEntry = (HGSMIGUESTCOMPLENTRY *)RTMemAllocZ (sizeof (HGSMIGUESTCOMPLENTRY));
227 if (pEntry)
228 *ppEntry = pEntry;
285 HGSMIGUESTCOMPLENTRY *pEntry = RTListGetFirst(&pIns->guestCmdCompleted, HGSMIGUESTCOMPLENTRY, nodeEntry);
286 if (pEntry)
288 RTListNodeRemove(&pEntry->nodeEntry);
301 if (pEntry)
303 offCmd = pEntry->offBuffer;
305 LogFlowFunc(("host FIFO head %p.\n", pEntry));
307 hgsmiGuestCompletionFIFOFree(pIns, pEntry);
347 HGSMIHOSTFIFOENTRY *pEntry = NULL;
355 pEntry = pIter;
360 LogFlowFunc(("read list entry: %p.\n", pEntry));
362 Assert(pEntry || bCompleteFirst);
364 if (pEntry)
366 RTListNodeRemove(&pEntry->nodeEntry);
368 pEntry->fl &= ~HGSMI_F_HOST_FIFO_READ;
369 pEntry->fl |= HGSMI_F_HOST_FIFO_PROCESSED;
371 RTListAppend(&pIns->hostFIFOProcessed, &pEntry->nodeEntry);
376 if (pEntry->pfnCallback)
378 pEntry->pfnCallback (pEntry->pvCallback);
381 hgsmiHostCommandFreeCallback(pEntry);
421 HGSMIHOSTFIFOENTRY *pEntry = RTListGetFirst(&pIns->hostFIFO, HGSMIHOSTFIFOENTRY, nodeEntry);
423 LogFlowFunc(("host FIFO head %p.\n", pEntry));
425 if (pEntry != NULL)
427 Assert(pEntry->fl == (HGSMI_F_HOST_FIFO_ALLOCATED | HGSMI_F_HOST_FIFO_QUEUED));
432 RTListNodeRemove(&pEntry->nodeEntry);
439 pEntry->fl &= ~HGSMI_F_HOST_FIFO_QUEUED;
440 pEntry->fl |= HGSMI_F_HOST_FIFO_READ;
442 RTListAppend(&pIns->hostFIFORead, &pEntry->nodeEntry);
447 return pEntry->offBuffer;
478 static void hgsmiRaiseEvent (const HGSMIHOSTFIFOENTRY *pEntry)
480 int rc = RTSemEventMultiSignal (pEntry->hEvent);
484 static int hgsmiWaitEvent (const HGSMIHOSTFIFOENTRY *pEntry)
486 int rc = RTSemEventMultiWait (pEntry->hEvent, RT_INDEFINITE_WAIT);
517 HGSMIHOSTFIFOENTRY *pEntry = (HGSMIHOSTFIFOENTRY *)RTMemAllocZ (sizeof (HGSMIHOSTFIFOENTRY));
519 if (pEntry)
521 pEntry->fl = HGSMI_F_HOST_FIFO_ALLOCATED;
523 rc = RTSemEventMultiCreate (&pEntry->hEvent);
527 RTMemFree (pEntry);
538 *ppEntry = pEntry;
544 static void hgsmiHostFIFOFree (HGSMIINSTANCE *pIns, HGSMIHOSTFIFOENTRY *pEntry)
548 if (pEntry->hEvent)
550 RTSemEventMultiDestroy (pEntry->hEvent);
553 RTMemFree (pEntry);
556 static int hgsmiHostCommandFreeByEntry (HGSMIHOSTFIFOENTRY *pEntry)
558 HGSMIINSTANCE *pIns = pEntry->pIns;
562 RTListNodeRemove(&pEntry->nodeEntry);
565 void *pvMem = HGSMIBufferDataFromOffset(&pIns->area, pEntry->offBuffer);
576 hgsmiHostFIFOFree (pIns, pEntry);
592 HGSMIHOSTFIFOENTRY *pEntry = NULL;
601 pEntry = pIter;
606 if (pEntry)
608 RTListNodeRemove(&pEntry->nodeEntry);
627 if(pEntry)
630 hgsmiHostFIFOFree (pIns, pEntry);
648 HGSMIHOSTFIFOENTRY *pEntry = (HGSMIHOSTFIFOENTRY *)pvCallback;
650 Assert(pEntry->fl == (HGSMI_F_HOST_FIFO_ALLOCATED | HGSMI_F_HOST_FIFO_PROCESSED));
653 hgsmiRaiseEvent (pEntry);
660 HGSMIHOSTFIFOENTRY *pEntry = (HGSMIHOSTFIFOENTRY *)pvCallback;
662 Assert(pEntry->fl == (HGSMI_F_HOST_FIFO_ALLOCATED | HGSMI_F_HOST_FIFO_PROCESSED));
665 hgsmiHostCommandFreeByEntry (pEntry);
674 HGSMIHOSTFIFOENTRY *pEntry;
677 int rc = hgsmiHostFIFOAlloc (pIns, &pEntry);
682 pEntry->fl |= HGSMI_F_HOST_FIFO_QUEUED;
684 pEntry->pIns = pIns;
685 pEntry->offBuffer = offMem;
687 pEntry->pfnCallback = pfnCallback;
688 pEntry->pvCallback = pEntry;
694 RTListAppend(&pIns->hostFIFO, &pEntry->nodeEntry);
699 *ppvContext = pEntry;
704 hgsmiHostFIFOFree(pIns, pEntry);
763 HGSMIHOSTFIFOENTRY *pEntry = (HGSMIHOSTFIFOENTRY *)pvContext;
767 hgsmiWaitEvent (pEntry);
769 if (pEntry->fl & (HGSMI_F_HOST_FIFO_PROCESSED | HGSMI_F_HOST_FIFO_CANCELED))
1035 HGSMIHOSTFIFOENTRY *pEntry;
1036 int rc = hgsmiHostFIFOAlloc (pIns, &pEntry); AssertRC(rc);
1040 pEntry->pIns = pIns;
1042 pEntry->fl = u32;
1043 rc = SSMR3GetU32 (pSSM, &pEntry->offBuffer); AssertRC(rc);
1045 *ppEntry = pEntry;
1047 hgsmiHostFIFOFree (pIns, pEntry);
1064 HGSMIHOSTFIFOENTRY *pEntry = NULL;
1065 rc = hgsmiHostLoadFifoEntryLocked(pIns, &pEntry, pSSM);
1068 RTListAppend(pList, &pEntry->nodeEntry);
1079 HGSMIGUESTCOMPLENTRY *pEntry;
1080 int rc = hgsmiGuestCompletionFIFOAlloc (pIns, &pEntry); AssertRC(rc);
1083 rc = SSMR3GetU32 (pSSM, &pEntry->offBuffer); AssertRC(rc);
1085 *ppEntry = pEntry;
1087 hgsmiGuestCompletionFIFOFree (pIns, pEntry);
1106 HGSMIGUESTCOMPLENTRY *pEntry = NULL;
1107 rc = hgsmiHostLoadGuestCmdCompletedFifoEntryLocked(pIns, &pEntry, pSSM);
1110 RTListAppend(pList, &pEntry->nodeEntry);
1121 HGSMIHOSTFIFOENTRY *pEntry = NULL;
1122 rc = hgsmiHostLoadFifoEntryLocked(pIns, &pEntry, pSSM);
1125 hgsmiHostFIFOFree(pIns, pEntry);
1677 HGSMIGUESTCOMPLENTRY *pEntry = NULL;
1680 int rc = hgsmiGuestCompletionFIFOAlloc (pIns, &pEntry);
1684 pEntry->offBuffer = offMem;
1690 RTListAppend(&pIns->guestCmdCompleted, &pEntry->nodeEntry);
1697 hgsmiGuestCompletionFIFOFree(pIns, pEntry);