Lines Matching refs:pQueue
147 PushMessage (WMMsgQueuePtr pQueue, WMMsgNodePtr pNode);
150 PopMessage (WMMsgQueuePtr pQueue, WMInfoPtr pWMInfo);
153 InitQueue (WMMsgQueuePtr pQueue);
217 PushMessage (WMMsgQueuePtr pQueue, WMMsgNodePtr pNode)
221 pthread_mutex_lock (&pQueue->pmMutex);
225 if (pQueue->pTail != NULL)
227 pQueue->pTail->pNext = pNode;
229 pQueue->pTail = pNode;
231 if (pQueue->pHead == NULL)
233 pQueue->pHead = pNode;
277 ++(pQueue->nQueueSize);
280 pthread_mutex_unlock (&pQueue->pmMutex);
283 pthread_cond_signal (&pQueue->pcNotEmpty);
293 QueueSize (WMMsgQueuePtr pQueue)
299 for (pNode = pQueue->pHead; pNode != NULL; pNode = pNode->pNext)
312 PopMessage (WMMsgQueuePtr pQueue, WMInfoPtr pWMInfo)
317 pthread_mutex_lock (&pQueue->pmMutex);
320 while (pQueue->pHead == NULL)
322 pthread_cond_wait (&pQueue->pcNotEmpty, &pQueue->pmMutex);
325 pNode = pQueue->pHead;
326 if (pQueue->pHead != NULL)
328 pQueue->pHead = pQueue->pHead->pNext;
331 if (pQueue->pTail == pNode)
333 pQueue->pTail = NULL;
337 --(pQueue->nQueueSize);
340 ErrorF ("Queue Size %d %d\n", pQueue->nQueueSize, QueueSize(pQueue));
344 pthread_mutex_unlock (&pQueue->pmMutex);
356 HaveMessage (WMMsgQueuePtr pQueue, UINT msg, Window iWindow)
360 for (pNode = pQueue->pHead; pNode != NULL; pNode = pNode->pNext)
377 InitQueue (WMMsgQueuePtr pQueue)
379 /* Check if the pQueue pointer is NULL */
380 if (pQueue == NULL)
382 ErrorF ("InitQueue - pQueue is NULL. Exiting.\n");
387 pQueue->pHead = NULL;
388 pQueue->pTail = NULL;
391 pQueue->nQueueSize = 0;
394 ErrorF ("InitQueue - Queue Size %d %d\n", pQueue->nQueueSize,
395 QueueSize(pQueue));
401 pthread_mutex_init (&pQueue->pmMutex, NULL);
406 pthread_cond_init (&pQueue->pcNotEmpty, NULL);