diff options
-rw-r--r-- | dix/dispatch.c | 4 | ||||
-rw-r--r-- | os/utils.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c index 78ac095b1..b4db19291 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -222,9 +222,13 @@ UpdateCurrentTimeIf(void) #define SMART_SCHEDULE_MAX_SLICE 15 #ifdef HAVE_SETITIMER +#if defined(WIN32) || defined(__CYGWIN__) +Bool SmartScheduleSignalEnable = FALSE; +#else #define SMART_SCHEDULE_DEFAULT_SIGNAL_ENABLE HAVE_SETITIMER Bool SmartScheduleSignalEnable = SMART_SCHEDULE_DEFAULT_SIGNAL_ENABLE; #endif +#endif long SmartScheduleSlice = SMART_SCHEDULE_DEFAULT_INTERVAL; long SmartScheduleInterval = SMART_SCHEDULE_DEFAULT_INTERVAL; diff --git a/os/utils.c b/os/utils.c index 5cd15b7ea..ddcd482e1 100644 --- a/os/utils.c +++ b/os/utils.c @@ -1019,6 +1019,9 @@ ProcessCommandLine(int argc, char *argv[]) } else if (strcmp(argv[i], "-schedInterval") == 0) { if (++i < argc) { +#if HAVE_SETITIMER + SmartScheduleSignalEnable = TRUE; +#endif SmartScheduleInterval = atoi(argv[i]); SmartScheduleSlice = SmartScheduleInterval; } @@ -1027,6 +1030,9 @@ ProcessCommandLine(int argc, char *argv[]) } else if (strcmp(argv[i], "-schedMax") == 0) { if (++i < argc) { +#if HAVE_SETITIMER + SmartScheduleSignalEnable = TRUE; +#endif SmartScheduleMaxSlice = atoi(argv[i]); } else |