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:
parent
f7d1e5acdf
commit
9fecc4cd57
|
@ -109,7 +109,6 @@ typedef struct _WMMsgQueueRec {
|
||||||
struct _WMMsgNodeRec *pTail;
|
struct _WMMsgNodeRec *pTail;
|
||||||
pthread_mutex_t pmMutex;
|
pthread_mutex_t pmMutex;
|
||||||
pthread_cond_t pcNotEmpty;
|
pthread_cond_t pcNotEmpty;
|
||||||
int nQueueSize;
|
|
||||||
} WMMsgQueueRec, *WMMsgQueuePtr;
|
} WMMsgQueueRec, *WMMsgQueuePtr;
|
||||||
|
|
||||||
typedef struct _WMInfo {
|
typedef struct _WMInfo {
|
||||||
|
@ -289,9 +288,6 @@ PushMessage(WMMsgQueuePtr pQueue, WMMsgNodePtr pNode)
|
||||||
pQueue->pHead = pNode;
|
pQueue->pHead = pNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Increase the count of elements in the queue by one */
|
|
||||||
++(pQueue->nQueueSize);
|
|
||||||
|
|
||||||
/* Release the queue mutex */
|
/* Release the queue mutex */
|
||||||
pthread_mutex_unlock(&pQueue->pmMutex);
|
pthread_mutex_unlock(&pQueue->pmMutex);
|
||||||
|
|
||||||
|
@ -299,25 +295,6 @@ PushMessage(WMMsgQueuePtr pQueue, WMMsgNodePtr pNode)
|
||||||
pthread_cond_signal(&pQueue->pcNotEmpty);
|
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
|
* PopMessage - Pop a message from the queue
|
||||||
*/
|
*/
|
||||||
|
@ -344,13 +321,6 @@ PopMessage(WMMsgQueuePtr pQueue, WMInfoPtr pWMInfo)
|
||||||
pQueue->pTail = NULL;
|
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 */
|
/* Release the queue mutex */
|
||||||
pthread_mutex_unlock(&pQueue->pmMutex);
|
pthread_mutex_unlock(&pQueue->pmMutex);
|
||||||
|
|
||||||
|
@ -394,14 +364,6 @@ InitQueue(WMMsgQueuePtr pQueue)
|
||||||
pQueue->pHead = NULL;
|
pQueue->pHead = NULL;
|
||||||
pQueue->pTail = 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");
|
winDebug("InitQueue - Calling pthread_mutex_init\n");
|
||||||
|
|
||||||
/* Create synchronization objects */
|
/* Create synchronization objects */
|
||||||
|
|
Loading…
Reference in New Issue