Lines Matching refs:pQueue
140 PushMessage(WMMsgQueuePtr pQueue, WMMsgNodePtr pNode);
142 static WMMsgNodePtr PopMessage(WMMsgQueuePtr pQueue, WMInfoPtr pWMInfo);
145 InitQueue(WMMsgQueuePtr pQueue);
245 PushMessage(WMMsgQueuePtr pQueue, WMMsgNodePtr pNode) in PushMessage() argument
249 pthread_mutex_lock(&pQueue->pmMutex); in PushMessage()
253 if (pQueue->pTail != NULL) { in PushMessage()
254 pQueue->pTail->pNext = pNode; in PushMessage()
256 pQueue->pTail = pNode; in PushMessage()
258 if (pQueue->pHead == NULL) { in PushMessage()
259 pQueue->pHead = pNode; in PushMessage()
263 pthread_mutex_unlock(&pQueue->pmMutex); in PushMessage()
266 pthread_cond_signal(&pQueue->pcNotEmpty); in PushMessage()
274 PopMessage(WMMsgQueuePtr pQueue, WMInfoPtr pWMInfo) in PopMessage() argument
279 pthread_mutex_lock(&pQueue->pmMutex); in PopMessage()
282 while (pQueue->pHead == NULL) { in PopMessage()
283 pthread_cond_wait(&pQueue->pcNotEmpty, &pQueue->pmMutex); in PopMessage()
286 pNode = pQueue->pHead; in PopMessage()
287 if (pQueue->pHead != NULL) { in PopMessage()
288 pQueue->pHead = pQueue->pHead->pNext; in PopMessage()
291 if (pQueue->pTail == pNode) { in PopMessage()
292 pQueue->pTail = NULL; in PopMessage()
296 pthread_mutex_unlock(&pQueue->pmMutex); in PopMessage()
307 HaveMessage(WMMsgQueuePtr pQueue, UINT msg, xcb_window_t iWindow)
311 for (pNode = pQueue->pHead; pNode != NULL; pNode = pNode->pNext) {
326 InitQueue(WMMsgQueuePtr pQueue) in InitQueue() argument
329 if (pQueue == NULL) { in InitQueue()
335 pQueue->pHead = NULL; in InitQueue()
336 pQueue->pTail = NULL; in InitQueue()
341 pthread_mutex_init(&pQueue->pmMutex, NULL); in InitQueue()
346 pthread_cond_init(&pQueue->pcNotEmpty, NULL); in InitQueue()