diff --git a/main.c b/main.c index 65942c1..bd40652 100644 --- a/main.c +++ b/main.c @@ -309,6 +309,14 @@ int main CAM_Initialise(); RTC_Initialise(); + if (SchedPriority > 0) { + SYS_SetScheduler(SchedPriority); + } + + if (LockAll == 1 ) { + SYS_MemLockAll(LockAll); + } + if (user) SYS_DropRoot(user); @@ -339,18 +347,6 @@ int main signal(SIGHUP, signal_cleanup); #endif /* WINNT */ -#if defined(HAVE_SCHED_SETSCHEDULER) - if (SchedPriority > 0) { - SYS_SetScheduler(SchedPriority); - } -#endif - -#if defined(HAVE_MLOCKALL) - if (LockAll == 1 ) { - SYS_MemLockAll(LockAll); - } -#endif - /* The program normally runs under control of the main loop in the scheduler. */ SCH_MainLoop(); diff --git a/sys_linux.h b/sys_linux.h index d4bc2f6..5cde036 100644 --- a/sys_linux.h +++ b/sys_linux.h @@ -41,6 +41,6 @@ extern void SYS_Linux_DropRoot(char *user); extern void SYS_Linux_MemLockAll(int LockAll); -extern void SYS_linux_SetScheduler(int SchedPriority); +extern void SYS_Linux_SetScheduler(int SchedPriority); #endif /* GOT_SYS_LINUX_H */