On 10/28/2016 09:41 PM, Jon Elson wrote: > This is why I keep popping up with asking about > externally-triggered RT threads, which should relieve all > the Pico Systems boards from the RT latency issue. I > don't mind doing some work on this, especially testing and > verification, but I'm not sure I'm competent to dive into > rtapi to try to do it myself. > OK, I did a little reading of the code, to get some sense of how much needed to be changed in rtapi superstructure for externally-triggered threads.
First, you'd need to change emc/motion/motion.c to accept parameters that defined an interrupt rather than a time in ns for the thread. It would then need to pass this info to hal/hal_lib.c function hal_create_thread() to actually create the RT thread based on that interrupt #. One would want to make this flexible enough to handle interrupt numbers for not only the PC but ARM processors, too. hal_create_thread() has a lot of code in it to regularize the thread period, make it an integral number of timer ticks, make other threads multiples of the fastest thread, and so on. All of this would be "broken" by interrupt-scheduled threads. At this point, I'd have to do a lot more reading to figure out how the rtapi functions do what they do. Any comments? Jon ------------------------------------------------------------------------------ The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
