/ README.LXRT_EXTS_IN_USE
README.LXRT_EXTS_IN_USE
1 User space RTAI syscalls have 16 extensions slots. They allow any user to 2 extend RTAI with her/his own user space callable APIs without touching 3 RTAI itself. For the most efficient inline usage of any extension user slots 4 must be assigned statically. RTAI itself uses a few extension slots for some 5 of its native addons, as listed below. 6 7 Those already used by modules found in this distributions are: 8 0 - RTAI itself (hardwired), 9 1 - tasklets (hardwired), 10 2 - watchdog (hardwired), 11 9 - comedi, 12 10 - fifos, 13 14 - serial, 14 15 - rtdm. 15 16 So you can reuse the above slots only if you are not using the related modules 17 found in this distribution. In any case check the value returned by: 18 set_rt_fun_ext_index. 19 20 N.B. "(hardwired)" above means they are assumed as basic RTAI proper extensions. 21 Nonetheless extension 1 and 2 do check if they can install into their hardwired 22 slots, exiting their installation in error if they cannot. 23 So you can make the related slot yours if neither tasklets nor watchdog are 24 being used by your applications; __NEVER__ USE 0 though. 25 In any case you'd better choose the other many free slots available to avoid 26 any trouble. 27 28 If in doubt about slots engaged already use something like the following piece 29 of code in your extension module to discover them: 30 31 #define MAX_LXRT_EXT 16 32 do { 33 int i; 34 struct rt_fun_entry fun; 35 for (i = 0; i < MAX_LXRT_EXT; i++) { 36 if (set_rt_fun_ext_index(&fun, i) < 0) { 37 rt_printk("< LXRT SLOT %d ENGAGED >\n", i); 38 } else { 39 reset_rt_fun_ext_index(&fun, i); 40 } 41 } 42 } while (0); 43 44 It has been already said above but, if you are still asking yourself why there 45 is a forced staticalization of LXRT extension slots assignment, while it 46 would be trivial to have functions to get/free slots dynamically, think about 47 efficiency first, especially if direct (eager in the related RTAI config 48 caption) inlining is used. 49 50 WARNING 51 52 If you intend to use Linux i386 with REGPARM configured notice that all your 53 functions callable from user space must be prefixed with "RTAI_SYSCALL_MODE". 54 In such a way they will be usable both with and without REGPARM. If you do 55 not do so then avoid configuring REGPARM for Linux, which is not possible from 56 2.6.20 onward, where REGPARM is the only way to operate and so it is an option 57 no more.