diff options
Diffstat (limited to 'os/utils.c')
-rw-r--r-- | os/utils.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/os/utils.c b/os/utils.c index 411daa047..6f75c1704 100644 --- a/os/utils.c +++ b/os/utils.c @@ -71,6 +71,7 @@ __stdcall unsigned long GetTickCount(void); #if !defined(WIN32) || !defined(__MINGW32__) #include <sys/time.h> #include <sys/resource.h> +# define SMART_SCHEDULE_POSSIBLE #endif #include "misc.h" #include <X11/X.h> @@ -898,6 +899,7 @@ ProcessCommandLine(int argc, char *argv[]) i = skip - 1; } #endif +#ifdef SMART_SCHEDULE_POSSIBLE else if (strcmp(argv[i], "-dumbSched") == 0) { SmartScheduleDisable = TRUE; } @@ -916,6 +918,7 @@ ProcessCommandLine(int argc, char *argv[]) else UseMsg(); } +#endif else if (strcmp(argv[i], "-render") == 0) { if (++i < argc) { int policy = PictureParseCmapPolicy(argv[i]); @@ -1127,6 +1130,7 @@ XNFstrdup(const char *s) void SmartScheduleStopTimer(void) { +#ifdef SMART_SCHEDULE_POSSIBLE struct itimerval timer; if (SmartScheduleDisable) @@ -1136,11 +1140,13 @@ SmartScheduleStopTimer(void) timer.it_value.tv_sec = 0; timer.it_value.tv_usec = 0; (void) setitimer(ITIMER_REAL, &timer, 0); +#endif } void SmartScheduleStartTimer(void) { +#ifdef SMART_SCHEDULE_POSSIBLE struct itimerval timer; if (SmartScheduleDisable) @@ -1150,6 +1156,7 @@ SmartScheduleStartTimer(void) timer.it_value.tv_sec = 0; timer.it_value.tv_usec = SmartScheduleInterval * 1000; setitimer(ITIMER_REAL, &timer, 0); +#endif } static void @@ -1161,6 +1168,7 @@ SmartScheduleTimer(int sig) void SmartScheduleInit(void) { +#ifdef SMART_SCHEDULE_POSSIBLE struct sigaction act; if (SmartScheduleDisable) @@ -1176,6 +1184,7 @@ SmartScheduleInit(void) perror("sigaction for smart scheduler"); SmartScheduleDisable = TRUE; } +#endif } #ifdef SIG_BLOCK |