xwin: Remove unhelpful debug about WM message queue size

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Jon Turney 2016-01-12 16:18:35 +00:00 committed by Adam Jackson
parent f7d1e5acdf
commit 9fecc4cd57

View File

@ -109,7 +109,6 @@ typedef struct _WMMsgQueueRec {
struct _WMMsgNodeRec *pTail;
pthread_mutex_t pmMutex;
pthread_cond_t pcNotEmpty;
int nQueueSize;
} WMMsgQueueRec, *WMMsgQueuePtr;
typedef struct _WMInfo {
@ -289,9 +288,6 @@ PushMessage(WMMsgQueuePtr pQueue, WMMsgNodePtr pNode)
pQueue->pHead = pNode;
}
/* Increase the count of elements in the queue by one */
++(pQueue->nQueueSize);
/* Release the queue mutex */
pthread_mutex_unlock(&pQueue->pmMutex);
@ -299,25 +295,6 @@ PushMessage(WMMsgQueuePtr pQueue, WMMsgNodePtr pNode)
pthread_cond_signal(&pQueue->pcNotEmpty);
}
#if CYGMULTIWINDOW_DEBUG
/*
* QueueSize - Return the size of the queue
*/
static int
QueueSize(WMMsgQueuePtr pQueue)
{
WMMsgNodePtr pNode;
int nSize = 0;
/* Loop through all elements in the queue */
for (pNode = pQueue->pHead; pNode != NULL; pNode = pNode->pNext)
++nSize;
return nSize;
}
#endif
/*
* PopMessage - Pop a message from the queue
*/
@ -344,13 +321,6 @@ PopMessage(WMMsgQueuePtr pQueue, WMInfoPtr pWMInfo)
pQueue->pTail = NULL;
}
/* Drop the number of elements in the queue by one */
--(pQueue->nQueueSize);
#if CYGMULTIWINDOW_DEBUG
ErrorF("Queue Size %d %d\n", pQueue->nQueueSize, QueueSize(pQueue));
#endif
/* Release the queue mutex */
pthread_mutex_unlock(&pQueue->pmMutex);
@ -394,14 +364,6 @@ InitQueue(WMMsgQueuePtr pQueue)
pQueue->pHead = NULL;
pQueue->pTail = NULL;
/* There are no elements initially */
pQueue->nQueueSize = 0;
#if CYGMULTIWINDOW_DEBUG
winDebug("InitQueue - Queue Size %d %d\n", pQueue->nQueueSize,
QueueSize(pQueue));
#endif
winDebug("InitQueue - Calling pthread_mutex_init\n");
/* Create synchronization objects */