Sebastian Kuzminsky wrote: > John Kasunich <[EMAIL PROTECTED]> wrote: >> Sebastian Kuzminsky wrote: >>> Sometimes the delay between successive I/O operations is on the order >>> of 200-300 microseconds! >> Is this code part of a HAL function and running in a HAL thread? If so, >> are you are running it in the EMC servo thread? Do you have a base >> thread? The base thread is higher priority and will interrupt the servo >> thread. > > Good point. I forgot to mention that this code is part of the module > setup, as in, a comp EXTRA_SETUP() function. > > For the tests I described I did not have EMC running. I ran "realtime > start", then immediately loaded the module by hand using halcmd without > running anything else. >
If it is not a function that is part of a HAL thread, it is not realtime code. Startup code runs in kernel space but does not have any realtime guarantees - it can be interrupted by other kernel activity, including activity caused by system calls from totally unrelated userspace programs. The only code in EMC that is guaranteed never to be interrupted (except by higher priority realtime code) is code running in a HAL thread. Hopefully your startup code doesn't have hard realtime requirements. If it does, you probably will have to skip comp and write the driver in C, so that you can create a rtapi realtime task/thread, run your code in that thread, and then destroy the thread. This is not pretty, so I hope you can tolerate the 200uS delays you are seeing. Regards, John Kasunich ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
