Lines Matching refs:pMsg

139         int MsgPost (HGCMMsgCore *pMsg, PHGCMMSGCALLBACK pfnCallback, bool bWait);
140 void MsgComplete (HGCMMsgCore *pMsg, int32_t result);
392 int HGCMThread::MsgPost (HGCMMsgCore *pMsg, PHGCMMSGCALLBACK pfnCallback, bool fWait)
396 LogFlow(("HGCMThread::MsgPost: thread = %p, pMsg = %p, pfnCallback = %p\n", this, pMsg, pfnCallback));
402 pMsg->m_pfnCallback = pfnCallback;
406 pMsg->m_fu32Flags |= HGCM_MSG_F_WAIT;
410 pMsg->m_pNext = NULL;
411 pMsg->m_pPrev = m_pMsgInputQueueTail;
415 m_pMsgInputQueueTail->m_pNext = pMsg;
419 m_pMsgInputQueueHead = pMsg;
422 m_pMsgInputQueueTail = pMsg;
436 while ((pMsg->m_fu32Flags & HGCM_MSG_F_PROCESSED) == 0)
441 LogFlow(("HGCMThread::MsgPost: wait completed flags = %08X\n", pMsg->m_fu32Flags));
443 if ((pMsg->m_fu32Flags & HGCM_MSG_F_PROCESSED) == 0)
461 rc = pMsg->m_rcSend;
497 HGCMMsgCore *pMsg = m_pMsgInputQueueHead;
516 pMsg->m_pNext = NULL;
517 pMsg->m_pPrev = m_pMsgInProcessTail;
521 m_pMsgInProcessTail->m_pNext = pMsg;
525 m_pMsgInProcessHead = pMsg;
528 m_pMsgInProcessTail = pMsg;
530 pMsg->m_fu32Flags |= HGCM_MSG_F_IN_PROCESS;
535 *ppMsg = pMsg;
552 void HGCMThread::MsgComplete (HGCMMsgCore *pMsg, int32_t result)
554 LogFlow(("HGCMThread::MsgComplete: thread = %p, pMsg = %p\n", this, pMsg));
558 AssertRelease(pMsg->m_pThread == this);
559 AssertReleaseMsg((pMsg->m_fu32Flags & HGCM_MSG_F_IN_PROCESS) != 0, ("%p %x\n", pMsg, pMsg->m_fu32Flags));
561 if (pMsg->m_pfnCallback)
565 pMsg->m_pfnCallback (result, pMsg);
567 LogFlow(("HGCMThread::MsgComplete: callback executed. pMsg = %p, thread = %p\n", pMsg, this));
578 if (pMsg->m_pNext)
580 pMsg->m_pNext->m_pPrev = pMsg->m_pPrev;
584 m_pMsgInProcessTail = pMsg->m_pPrev;
587 if (pMsg->m_pPrev)
589 pMsg->m_pPrev->m_pNext = pMsg->m_pNext;
593 m_pMsgInProcessHead = pMsg->m_pNext;
596 pMsg->m_pNext = NULL;
597 pMsg->m_pPrev = NULL;
599 bool fWaited = ((pMsg->m_fu32Flags & HGCM_MSG_F_WAIT) != 0);
606 pMsg->m_rcSend = result;
610 pMsg->m_fu32Flags &= ~HGCM_MSG_F_IN_PROCESS;
611 pMsg->m_fu32Flags &= ~HGCM_MSG_F_WAIT;
612 pMsg->m_fu32Flags |= HGCM_MSG_F_PROCESSED;
614 hgcmObjDeleteHandle (pMsg->Handle ());
733 HGCMMsgCore *pMsg = (HGCMMsgCore *)hgcmObjReference (hMsg, HGCMOBJ_MSG);
735 if (!pMsg)
741 rc = pMsg->Thread()->MsgPost (pMsg, pfnCallback, fWait);
743 hgcmObjDereference (pMsg);
810 void hgcmMsgComplete (HGCMMsgCore *pMsg, int32_t u32Result)
812 LogFlow(("MAIN::hgcmMsgComplete: pMsg = %p\n", pMsg));
814 if (!pMsg)
819 pMsg->Thread()->MsgComplete (pMsg, u32Result);
821 LogFlow(("MAIN::hgcmMsgComplete: pMsg = %p, rc = void\n", pMsg));