File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -928,11 +928,7 @@ static void configure_memory() {
928928 free ((void *)buf);
929929}
930930
931- static int harden_rt () {
932- if (!rtapi_is_realtime ())
933- return -EINVAL ;
934-
935- WITH_ROOT ;
931+ static void harden_rt () {
936932#if defined(__linux__) && (defined(__x86_64__) || defined(__i386__))
937933 if (iopl (3 ) < 0 ) {
938934 rtapi_print_msg (
@@ -1003,7 +999,6 @@ static int harden_rt() {
1003999 // deliberately leak fd until program exit
10041000 }
10051001#endif /* __linux__ */
1006- return 0 ;
10071002}
10081003
10091004static RtapiApp *makeDllApp (const std::string &dllName, int policy) {
@@ -1096,10 +1091,11 @@ static RtapiApp *makeApp() {
10961091 if (caps) cap_free (caps);
10971092#endif
10981093 }
1099- if (!rt_ok || harden_rt () < 0 ) {
1094+ if (!rt_ok) {
11001095 app = makeDllApp (" liblinuxcnc-uspace-posix.so.0" , SCHED_OTHER );
11011096 } else {
11021097 WithRoot r;
1098+ harden_rt ();
11031099 if (detect_xenomai_evl ()) {
11041100 app = makeDllApp (" liblinuxcnc-uspace-xenomai-evl.so.0" , SCHED_FIFO );
11051101 } else if (detect_xenomai ()) {
You can’t perform that action at this time.
0 commit comments