diff options
author | Mathieu BĂ©rard <mathieu.berard@crans.org> | 2008-08-11 13:52:38 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2008-08-11 13:52:38 -0400 |
commit | 9f9268821b13038556fbc029df54ab0e9b2aa77f (patch) | |
tree | e9ca5dd417acfa3a2d9171f6f5e972903dcab88a /os | |
parent | 2e2ce817ce404a5e000c9750fa96f656fed370b8 (diff) |
The smart scheduler is not optional.
Diffstat (limited to 'os')
-rw-r--r-- | os/WaitFor.c | 14 | ||||
-rw-r--r-- | os/io.c | 6 | ||||
-rw-r--r-- | os/osinit.c | 4 | ||||
-rw-r--r-- | os/utils.c | 8 |
4 files changed, 0 insertions, 32 deletions
diff --git a/os/WaitFor.c b/os/WaitFor.c index f07388be4..d6dd99553 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -155,9 +155,7 @@ WaitForSomething(int *pClientsReady) int nready; fd_set devicesReadable; CARD32 now = 0; -#ifdef SMART_SCHEDULE Bool someReady = FALSE; -#endif FD_ZERO(&clientsReadable); @@ -170,7 +168,6 @@ WaitForSomething(int *pClientsReady) ProcessWorkQueue(); if (XFD_ANYSET (&ClientsWithInput)) { -#ifdef SMART_SCHEDULE if (!SmartScheduleDisable) { someReady = TRUE; @@ -179,13 +176,11 @@ WaitForSomething(int *pClientsReady) wt = &waittime; } else -#endif { XFD_COPYSET (&ClientsWithInput, &clientsReadable); break; } } -#ifdef SMART_SCHEDULE if (someReady) { XFD_COPYSET(&AllSockets, &LastSelectMask); @@ -193,7 +188,6 @@ WaitForSomething(int *pClientsReady) } else { -#endif wt = NULL; if (timers) { @@ -215,11 +209,9 @@ WaitForSomething(int *pClientsReady) } } XFD_COPYSET(&AllSockets, &LastSelectMask); -#ifdef SMART_SCHEDULE } SmartScheduleStopTimer (); -#endif BlockHandler((pointer)&wt, (pointer)&LastSelectMask); if (NewOutputPending) FlushAllOutput(); @@ -237,9 +229,7 @@ WaitForSomething(int *pClientsReady) } selecterr = GetErrno(); WakeupHandler(i, (pointer)&LastSelectMask); -#ifdef SMART_SCHEDULE SmartScheduleStartTimer (); -#endif if (i <= 0) /* An error or timeout occurred */ { if (dispatchException) @@ -263,7 +253,6 @@ WaitForSomething(int *pClientsReady) strerror(selecterr)); } } -#ifdef SMART_SCHEDULE else if (someReady) { /* @@ -273,7 +262,6 @@ WaitForSomething(int *pClientsReady) XFD_COPYSET(&ClientsWithInput, &clientsReadable); break; } -#endif if (*checkForInput[0] != *checkForInput[1]) return 0; @@ -310,10 +298,8 @@ WaitForSomething(int *pClientsReady) return 0; } } -#ifdef SMART_SCHEDULE if (someReady) XFD_ORSET(&LastSelectMask, &ClientsWithInput, &LastSelectMask); -#endif if (AnyClientsWriteBlocked && XFD_ANYSET (&clientsWritable)) { NewOutputPending = TRUE; @@ -411,11 +411,9 @@ ReadRequestFromClient(ClientPtr client) FD_SET(fd, &ClientsWithInput); else { -#ifdef SMART_SCHEDULE if (!SmartScheduleDisable) FD_CLR(fd, &ClientsWithInput); else -#endif YieldControlNoInput(); } } @@ -423,16 +421,12 @@ ReadRequestFromClient(ClientPtr client) { if (!gotnow) AvailableInput = oc; -#ifdef SMART_SCHEDULE if (!SmartScheduleDisable) FD_CLR(fd, &ClientsWithInput); else -#endif YieldControlNoInput(); } -#ifdef SMART_SCHEDULE if (SmartScheduleDisable) -#endif if (++timesThisConnection >= MAX_TIMES_PER) YieldControl(); if (move_header) diff --git a/os/osinit.c b/os/osinit.c index 986a6420c..74e2457f2 100644 --- a/os/osinit.c +++ b/os/osinit.c @@ -55,9 +55,7 @@ SOFTWARE. #include "osdep.h" #include <X11/Xos.h> -#ifdef SMART_SCHEDULE #include "dixstruct.h" -#endif #ifndef PATH_MAX #ifdef MAXPATHLEN @@ -199,11 +197,9 @@ OsInit(void) * log file name if logging to a file is desired. */ LogInit(NULL, NULL); -#ifdef SMART_SCHEDULE if (!SmartScheduleDisable) if (!SmartScheduleInit ()) SmartScheduleDisable = TRUE; -#endif } void diff --git a/os/utils.c b/os/utils.c index 88a64950d..96da35dd0 100644 --- a/os/utils.c +++ b/os/utils.c @@ -111,9 +111,7 @@ OR PERFORMANCE OF THIS SOFTWARE. #include "opaque.h" -#ifdef SMART_SCHEDULE #include "dixstruct.h" -#endif #ifdef XKB #include <xkbsrv.h> @@ -552,10 +550,8 @@ void UseMsg(void) ErrorF("+xinerama Enable XINERAMA extension\n"); ErrorF("-xinerama Disable XINERAMA extension\n"); #endif -#ifdef SMART_SCHEDULE ErrorF("-dumbSched Disable smart scheduling, enable old behavior\n"); ErrorF("-schedInterval int Set scheduler interval in msec\n"); -#endif ErrorF("+extension name Enable extension\n"); ErrorF("-extension name Disable extension\n"); #ifdef XDMCP @@ -926,7 +922,6 @@ ProcessCommandLine(int argc, char *argv[]) i = skip - 1; } #endif -#ifdef SMART_SCHEDULE else if ( strcmp( argv[i], "-dumbSched") == 0) { SmartScheduleDisable = TRUE; @@ -950,7 +945,6 @@ ProcessCommandLine(int argc, char *argv[]) else UseMsg(); } -#endif #ifdef RENDER else if ( strcmp( argv[i], "-render" ) == 0) { @@ -1234,7 +1228,6 @@ XNFstrdup(const char *s) return sd; } -#ifdef SMART_SCHEDULE #ifdef SIGVTALRM #define SMART_SCHEDULE_POSSIBLE @@ -1310,7 +1303,6 @@ SmartScheduleInit (void) return FALSE; #endif } -#endif #ifdef SIG_BLOCK static sigset_t PreviousSignalMask; |