aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix
diff options
context:
space:
mode:
authorMathieu Bérard <mathieu.berard@crans.org>2017-02-09 14:05:32 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-02-15 10:19:06 +0000
commit6884e6a5b0cabdce39005470f4bcd0d960cfc956 (patch)
tree65241ce35eeee929f9a5d6033b493b0ec165a074 /nx-X11/programs/Xserver/dix
parent0a7df07702c6f56b708a22c666077a3b90c7542c (diff)
downloadnx-libs-6884e6a5b0cabdce39005470f4bcd0d960cfc956.tar.gz
nx-libs-6884e6a5b0cabdce39005470f4bcd0d960cfc956.tar.bz2
nx-libs-6884e6a5b0cabdce39005470f4bcd0d960cfc956.zip
The smart scheduler is not optional.
Backported from X.org: commit 9f9268821b13038556fbc029df54ab0e9b2aa77f Author: Mathieu Bérard <mathieu.berard@crans.org> Date: Mon Aug 11 13:52:38 2008 -0400 The smart scheduler is not optional. Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs/Xserver/dix')
-rw-r--r--nx-X11/programs/Xserver/dix/dispatch.c17
-rw-r--r--nx-X11/programs/Xserver/dix/events.c2
2 files changed, 0 insertions, 19 deletions
diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c
index d098afdc8..2c7550371 100644
--- a/nx-X11/programs/Xserver/dix/dispatch.c
+++ b/nx-X11/programs/Xserver/dix/dispatch.c
@@ -243,8 +243,6 @@ FlushClientCaches(XID id)
}
}
}
-#ifdef SMART_SCHEDULE
-
#undef SMART_DEBUG
#define SMART_SCHEDULE_DEFAULT_INTERVAL 20 /* ms */
@@ -345,7 +343,6 @@ SmartScheduleClient (int *clientReady, int nready)
}
return best;
}
-#endif
#ifndef NXAGENT_SERVER
#define MAJOROP ((xReq *)client->requestBuffer)->reqType
@@ -358,9 +355,7 @@ Dispatch(void)
register ClientPtr client;
register int nready;
register HWEventQueuePtr* icheck = checkForInput;
-#ifdef SMART_SCHEDULE
long start_tick;
-#endif
nextFreeClientID = 1;
InitSelections();
@@ -380,13 +375,11 @@ Dispatch(void)
nready = WaitForSomething(clientReady);
-#ifdef SMART_SCHEDULE
if (nready && !SmartScheduleDisable)
{
clientReady[0] = SmartScheduleClient (clientReady, nready);
nready = 1;
}
-#endif
/*****************
* Handle events in round robin fashion, doing input between
* each round
@@ -409,9 +402,7 @@ Dispatch(void)
isItTimeToYield = FALSE;
requestingClient = client;
-#ifdef SMART_SCHEDULE
start_tick = SmartScheduleTime;
-#endif
while (!isItTimeToYield)
{
if (*icheck[0] != *icheck[1])
@@ -419,7 +410,6 @@ Dispatch(void)
ProcessInputEvents();
FlushIfCriticalOutputPending();
}
-#ifdef SMART_SCHEDULE
if (!SmartScheduleDisable &&
(SmartScheduleTime - start_tick) >= SmartScheduleSlice)
{
@@ -428,7 +418,6 @@ Dispatch(void)
client->smart_priority--;
break;
}
-#endif
/* now, finally, deal with client requests */
result = ReadRequestFromClient(client);
@@ -466,11 +455,9 @@ Dispatch(void)
#endif
}
FlushAllOutput();
-#ifdef SMART_SCHEDULE
client = clients[clientReady[nready]];
if (client)
client->smart_stop_tick = SmartScheduleTime;
-#endif
requestingClient = NULL;
}
dispatchException &= ~DE_PRIORITYCHANGE;
@@ -3593,9 +3580,7 @@ CloseDownClient(register ClientPtr client)
if (client->index < nextFreeClientID)
nextFreeClientID = client->index;
clients[client->index] = NullClient;
-#ifdef SMART_SCHEDULE
SmartLastClient = NullClient;
-#endif
free(client);
while (!clients[currentMaxClients-1])
@@ -3684,12 +3669,10 @@ void InitClient(ClientPtr client, int i, void * ospriv)
client->authId = 0;
#endif
client->fontResFunc = NULL;
-#ifdef SMART_SCHEDULE
client->smart_priority = 0;
client->smart_start_tick = SmartScheduleTime;
client->smart_stop_tick = SmartScheduleTime;
client->smart_check_tick = SmartScheduleTime;
-#endif
}
extern int clientPrivateLen;
diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c
index abbde67d5..fa8bfc92d 100644
--- a/nx-X11/programs/Xserver/dix/events.c
+++ b/nx-X11/programs/Xserver/dix/events.c
@@ -1542,10 +1542,8 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask,
#endif
if (BitIsOn(criticalEvents, type))
{
-#ifdef SMART_SCHEDULE
if (client->smart_priority < SMART_MAX_PRIORITY)
client->smart_priority++;
-#endif
SetCriticalOutputPending();
}