Lines Matching refs:pQueue
145 PushMessage(WMMsgQueuePtr pQueue, WMMsgNodePtr pNode);
147 static WMMsgNodePtr PopMessage(WMMsgQueuePtr pQueue, WMInfoPtr pWMInfo);
150 InitQueue(WMMsgQueuePtr pQueue);
250 PushMessage(WMMsgQueuePtr pQueue, WMMsgNodePtr pNode)
254 pthread_mutex_lock(&pQueue->pmMutex);
258 if (pQueue->pTail != NULL) {
259 pQueue->pTail->pNext = pNode;
261 pQueue->pTail = pNode;
263 if (pQueue->pHead == NULL) {
264 pQueue->pHead = pNode;
268 pthread_mutex_unlock(&pQueue->pmMutex);
271 pthread_cond_signal(&pQueue->pcNotEmpty);
279 PopMessage(WMMsgQueuePtr pQueue, WMInfoPtr pWMInfo)
284 pthread_mutex_lock(&pQueue->pmMutex);
287 while (pQueue->pHead == NULL) {
288 pthread_cond_wait(&pQueue->pcNotEmpty, &pQueue->pmMutex);
291 pNode = pQueue->pHead;
292 if (pQueue->pHead != NULL) {
293 pQueue->pHead = pQueue->pHead->pNext;
296 if (pQueue->pTail == pNode) {
297 pQueue->pTail = NULL;
301 pthread_mutex_unlock(&pQueue->pmMutex);
312 HaveMessage(WMMsgQueuePtr pQueue, UINT msg, xcb_window_t iWindow)
316 for (pNode = pQueue->pHead; pNode != NULL; pNode = pNode->pNext) {
331 InitQueue(WMMsgQueuePtr pQueue)
333 /* Check if the pQueue pointer is NULL */
334 if (pQueue == NULL) {
335 ErrorF("InitQueue - pQueue is NULL. Exiting.\n");
340 pQueue->pHead = NULL;
341 pQueue->pTail = NULL;
346 pthread_mutex_init(&pQueue->pmMutex, NULL);
351 pthread_cond_init(&pQueue->pcNotEmpty, NULL);