Commit db3efd45 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

nxagent: make nxagentBlocking an Boolean

parent af2964c7
...@@ -660,7 +660,7 @@ static void nxagentDisplayBlockHandler(Display *disp, int reason) ...@@ -660,7 +660,7 @@ static void nxagentDisplayBlockHandler(Display *disp, int reason)
fprintf(stderr, "nxagentDisplayBlockHandler: BLOCK! Display is blocking for [write].\n"); fprintf(stderr, "nxagentDisplayBlockHandler: BLOCK! Display is blocking for [write].\n");
#endif #endif
nxagentBlocking = 1; nxagentBlocking = True;
if (!SmartScheduleSignalEnable) if (!SmartScheduleSignalEnable)
{ {
...@@ -908,7 +908,7 @@ void nxagentResetDisplayHandlers(void) ...@@ -908,7 +908,7 @@ void nxagentResetDisplayHandlers(void)
*/ */
nxagentBuffer = 0; nxagentBuffer = 0;
nxagentBlocking = 0; nxagentBlocking = False;
nxagentCongestion = 0; nxagentCongestion = 0;
/* /*
......
...@@ -2815,7 +2815,7 @@ int nxagentSynchronizationPredicate(void) ...@@ -2815,7 +2815,7 @@ int nxagentSynchronizationPredicate(void)
return NotNeeded; return NotNeeded;
} }
if (nxagentBlocking == 0 && if (!nxagentBlocking &&
nxagentCongestion <= 4 && nxagentCongestion <= 4 &&
nxagentReady == 0 && nxagentReady == 0 &&
nxagentUserInput(NULL) == 0) nxagentUserInput(NULL) == 0)
......
...@@ -122,7 +122,7 @@ Bool nxagentXdmcpAlertUp = False; ...@@ -122,7 +122,7 @@ Bool nxagentXdmcpAlertUp = False;
*/ */
int nxagentBuffer; int nxagentBuffer;
int nxagentBlocking; Bool nxagentBlocking;
int nxagentCongestion; int nxagentCongestion;
double nxagentBytesIn; double nxagentBytesIn;
...@@ -322,7 +322,7 @@ void nxagentBlockHandler(void * data, struct timeval **timeout, void * mask) ...@@ -322,7 +322,7 @@ void nxagentBlockHandler(void * data, struct timeval **timeout, void * mask)
nxagentForceSynchronization = 0; nxagentForceSynchronization = 0;
} }
else if (nxagentUserInput(NULL) == 0 && else if (nxagentUserInput(NULL) == 0 &&
nxagentBlocking == 0 && !nxagentBlocking &&
nxagentCongestion <= 4) nxagentCongestion <= 4)
{ {
#ifdef TEST #ifdef TEST
...@@ -391,7 +391,7 @@ void nxagentBlockHandler(void * data, struct timeval **timeout, void * mask) ...@@ -391,7 +391,7 @@ void nxagentBlockHandler(void * data, struct timeval **timeout, void * mask)
#ifdef DYNAMIC_DISPLAY_BUFFER #ifdef DYNAMIC_DISPLAY_BUFFER
if (nxagentBlocking == 1 && if (nxagentBlocking &&
nxagentBuffer > MINIMUM_DISPLAY_BUFFER) nxagentBuffer > MINIMUM_DISPLAY_BUFFER)
{ {
nxagentBuffer >>= 1; nxagentBuffer >>= 1;
...@@ -587,7 +587,7 @@ void nxagentWakeupHandler(void * data, int count, void * mask) ...@@ -587,7 +587,7 @@ void nxagentWakeupHandler(void * data, int count, void * mask)
* Can become true during the dispatch loop. * Can become true during the dispatch loop.
*/ */
nxagentBlocking = 0; nxagentBlocking = False;
/* /*
* Check if we got new events. * Check if we got new events.
...@@ -759,7 +759,7 @@ void nxagentShadowBlockHandler(void * data, struct timeval **timeout, void * mas ...@@ -759,7 +759,7 @@ void nxagentShadowBlockHandler(void * data, struct timeval **timeout, void * mas
nxagentShadowSendUpdates(&suspended); nxagentShadowSendUpdates(&suspended);
if (nxagentBlocking == 0) if (!nxagentBlocking)
{ {
nxagentSynchronizeDrawable((DrawablePtr) nxagentShadowPixmapPtr, DONT_WAIT, nxagentSynchronizeDrawable((DrawablePtr) nxagentShadowPixmapPtr, DONT_WAIT,
ALWAYS_BREAK, nxagentShadowWindowPtr); ALWAYS_BREAK, nxagentShadowWindowPtr);
...@@ -830,7 +830,7 @@ void nxagentShadowWakeupHandler(void * data, int count, void * mask) ...@@ -830,7 +830,7 @@ void nxagentShadowWakeupHandler(void * data, int count, void * mask)
* Can become true during the dispatch loop. * Can become true during the dispatch loop.
*/ */
nxagentBlocking = 0; nxagentBlocking = False;
/* /*
* Check if we got new events. * Check if we got new events.
...@@ -1200,7 +1200,7 @@ void nxagentDispatchHandler(ClientPtr client, int in, int out) ...@@ -1200,7 +1200,7 @@ void nxagentDispatchHandler(ClientPtr client, int in, int out)
nxagentDispatchEvents(NULL); nxagentDispatchEvents(NULL);
nxagentBlocking = 1; nxagentBlocking = True;
} }
/* /*
......
...@@ -37,7 +37,7 @@ extern int nxagentBuffer; ...@@ -37,7 +37,7 @@ extern int nxagentBuffer;
* the display to become writable. * the display to become writable.
*/ */
extern int nxagentBlocking; extern Bool nxagentBlocking;
/* /*
* Current congestion level based on * Current congestion level based on
......
...@@ -77,7 +77,7 @@ while (0) ...@@ -77,7 +77,7 @@ while (0)
#define breakOnBlocking(mask) \ #define breakOnBlocking(mask) \
(((mask) != NEVER_BREAK) && ((mask) & BLOCKING_BREAK) && \ (((mask) != NEVER_BREAK) && ((mask) & BLOCKING_BREAK) && \
nxagentBlocking == 1) nxagentBlocking)
#define breakOnCongestion(mask) \ #define breakOnCongestion(mask) \
(((mask) != NEVER_BREAK) && ((mask) & CONGESTION_BREAK) && \ (((mask) != NEVER_BREAK) && ((mask) & CONGESTION_BREAK) && \
...@@ -164,7 +164,7 @@ FIXME: Changed macro: NXAGENT_SHOULD_DEFER_COMPOSITE ...@@ -164,7 +164,7 @@ FIXME: Changed macro: NXAGENT_SHOULD_DEFER_COMPOSITE
#define NXAGENT_SHOULD_SYNCHRONIZE_CORRUPTED_PIXMAPS(mask) \ #define NXAGENT_SHOULD_SYNCHRONIZE_CORRUPTED_PIXMAPS(mask) \
((nxagentCorruptedWindows == 0 && nxagentCorruptedPixmaps > 0 && \ ((nxagentCorruptedWindows == 0 && nxagentCorruptedPixmaps > 0 && \
nxagentCongestion == 0 && nxagentBlocking == 0) || \ nxagentCongestion == 0 && !nxagentBlocking) || \
mask == NEVER_BREAK) mask == NEVER_BREAK)
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment