File tree Expand file tree Collapse file tree 2 files changed +15
-11
lines changed
Expand file tree Collapse file tree 2 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -381,24 +381,28 @@ static int detect_rtai() {
381381}
382382#endif
383383#ifdef USPACE_XENOMAI
384- static int detect_xenomai_evl () {
385- struct utsname u ;
386- uname (& u );
387- return strcasestr (u .release , "-xenomai4" ) != 0 ; //ToDo: This is not nice
388- }
389384static int detect_xenomai () {
390- struct utsname u ;
391- uname ( & u );
392- return strcasestr ( u . release , "-xenomai3" ) != 0 ; //ToDo: This is not nice
385+ struct stat sb ;
386+ //Running xenomai has /proc/xenomai
387+ return stat ( "/proc/xenomai" , & sb ) == 0 ;
393388}
394389#else
395- static int detect_xenomai_evl () {
390+ static int detect_xenomai () {
396391 return 0 ;
397392}
398- static int detect_xenomai () {
393+ #endif
394+ #ifdef USPACE_XENOMAI_EVL
395+ static int detect_xenomai_evl () {
396+ struct stat sb ;
397+ //Running xenomai evl has /dev/evl but no /proc/xenomai
398+ return stat ("/dev/evl" , & sb ) == 0 ;
399+ }
400+ #else
401+ static int detect_xenomai_evl () {
399402 return 0 ;
400403}
401404#endif
405+
402406static int detect_env_override () {
403407 char * p = getenv ("LINUXCNC_FORCE_REALTIME" );
404408 return p != NULL && atoi (p ) != 0 ;
Original file line number Diff line number Diff line change @@ -221,6 +221,6 @@ pthread_key_t XenomaiApp::key;
221221extern " C" RtapiApp *make ();
222222
223223RtapiApp *make () {
224- rtapi_print_msg (RTAPI_MSG_ERR, " Note: Using XENOMAI4 EVL (posix-skin) realtime\n " );
224+ rtapi_print_msg (RTAPI_MSG_ERR, " Note: Using XENOMAI4 EVL realtime\n " );
225225 return new XenomaiApp;
226226}
You can’t perform that action at this time.
0 commit comments