On 03/09/2015 07:18 PM, Steve B wrote: > > > On Wed, Mar 4, 2015 at 9:25 AM, Philippe Gerum <[email protected] > <mailto:[email protected]>> wrote: > > On 03/04/2015 05:59 PM, Steve B wrote: > > Hello, > > > > Is it possible that my hardware interrupts tied to RTDM device > drivers are > > able to pre-empt my high priority task running in primary mode, or > do the > > interrupts get serviced after the task yields the CPU? > > > > If taken by the CPU, IRQs hooked by a RTDM driver will preempt any > real-time task code immediately (in kernel or userland). IRQs hooked by > regular kernel drivers will be postponed until all rt activity has > completed on the receiving CPU. > > -- > Philippe. > > > A follow-up question. When this happens, does the execution return to > the primary-mode task that was running at the time the IRQ was received, > or does the scheduler let other runnable tasks have a shot at the CPU at > that time?
This return path is an opportunity for the real-time core to switch to a thread with higher priority that might have been resumed by the handler. Otherwise, the preempted thread resumes execution. The priority rule enforced can be expressed as: "at any point in time, the oldest runnable thread from the highest priority level shall run". -- Philippe. _______________________________________________ Xenomai mailing list [email protected] http://www.xenomai.org/mailman/listinfo/xenomai
