Fix memlockall patch
This commit is contained in:
parent
4aae133c4d
commit
96759116e2
2 changed files with 9 additions and 13 deletions
20
main.c
20
main.c
|
@ -309,6 +309,14 @@ int main
|
||||||
CAM_Initialise();
|
CAM_Initialise();
|
||||||
RTC_Initialise();
|
RTC_Initialise();
|
||||||
|
|
||||||
|
if (SchedPriority > 0) {
|
||||||
|
SYS_SetScheduler(SchedPriority);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (LockAll == 1 ) {
|
||||||
|
SYS_MemLockAll(LockAll);
|
||||||
|
}
|
||||||
|
|
||||||
if (user)
|
if (user)
|
||||||
SYS_DropRoot(user);
|
SYS_DropRoot(user);
|
||||||
|
|
||||||
|
@ -339,18 +347,6 @@ int main
|
||||||
signal(SIGHUP, signal_cleanup);
|
signal(SIGHUP, signal_cleanup);
|
||||||
#endif /* WINNT */
|
#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 program normally runs under control of the main loop in
|
||||||
the scheduler. */
|
the scheduler. */
|
||||||
SCH_MainLoop();
|
SCH_MainLoop();
|
||||||
|
|
|
@ -41,6 +41,6 @@ extern void SYS_Linux_DropRoot(char *user);
|
||||||
|
|
||||||
extern void SYS_Linux_MemLockAll(int LockAll);
|
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 */
|
#endif /* GOT_SYS_LINUX_H */
|
||||||
|
|
Loading…
Reference in a new issue