aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-15 16:01:26 +0000
committermarha <marha@users.sourceforge.net>2011-03-15 16:01:26 +0000
commit52b8618bfdaa4725fc403f50fe682d02e7f16435 (patch)
treec230e0689d1dfe20c88fe061ba631b02e3b1bc1c /xorg-server/hw/xwin
parent3ab36b2f4665ac51a8a6774fe7151c5cff9bf303 (diff)
downloadvcxsrv-52b8618bfdaa4725fc403f50fe682d02e7f16435.tar.gz
vcxsrv-52b8618bfdaa4725fc403f50fe682d02e7f16435.tar.bz2
vcxsrv-52b8618bfdaa4725fc403f50fe682d02e7f16435.zip
nQueueSize is not used in release build
Diffstat (limited to 'xorg-server/hw/xwin')
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c
index d83d49007..f178967e1 100644
--- a/xorg-server/hw/xwin/winmultiwindowwm.c
+++ b/xorg-server/hw/xwin/winmultiwindowwm.c
@@ -106,7 +106,9 @@ typedef struct _WMMsgQueueRec {
struct _WMMsgNodeRec *pTail;
pthread_mutex_t pmMutex;
pthread_cond_t pcNotEmpty;
+#ifdef _DEBUG
int nQueueSize;
+#endif
} WMMsgQueueRec, *WMMsgQueuePtr;
typedef struct _WMInfo {
@@ -238,8 +240,10 @@ PushMessage (WMMsgQueuePtr pQueue, WMMsgNodePtr pNode)
pQueue->pHead = pNode;
}
- /* Increase the count of elements in the queue by one */
+#ifdef _DEBUG
+ /* Increase the count of elements in the queue by one */
++(pQueue->nQueueSize);
+#endif
/* Release the queue mutex */
pthread_mutex_unlock (&pQueue->pmMutex);
@@ -298,10 +302,12 @@ PopMessage (WMMsgQueuePtr pQueue, WMInfoPtr pWMInfo)
pQueue->pTail = NULL;
}
- /* Drop the number of elements in the queue by one */
+ #ifdef _DEBUG
+ /* Drop the number of elements in the queue by one */
--(pQueue->nQueueSize);
winDebug ("Queue Size %d %d\n", pQueue->nQueueSize, QueueSize(pQueue));
+ #endif
/* Release the queue mutex */
pthread_mutex_unlock (&pQueue->pmMutex);
@@ -351,10 +357,12 @@ InitQueue (WMMsgQueuePtr pQueue)
pQueue->pTail = NULL;
/* There are no elements initially */
+ #ifdef _DEBUG
pQueue->nQueueSize = 0;
winDebug ("InitQueue - Queue Size %d %d\n", pQueue->nQueueSize,
QueueSize(pQueue));
+ #endif
winDebug ("InitQueue - Calling pthread_mutex_init\n");