diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c index b8577c87d..97b893fc0 100644 --- a/hw/xwin/winmultiwindowwm.c +++ b/hw/xwin/winmultiwindowwm.c @@ -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 */