[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Globally disabling preemption



Hi.

The rtems user guide states: "If preemption is disabled for a task 
(RTEMS_NO_PREEMPT), then the task will not relinquish control of the 
processor until it terminates, blocks, or re-enables preemption."

Given an RTEMS_NO_PREEMPT thread A, I'd like to clarify what happens if 
A is interrupted (as interrupts are still on).  When the scheduler runs 
at the end of an isr, what happens?  Will A always be rescheduled?  Or 
will the normal scheduling algorithm run and A may or may not be selected.

I suspect it's the later.  If this is the case, is there a recommended 
way of globally disabling preemption so as to have the effect of the 
former?  That is, A is interrupted, but is always rescheduled after the 
interrupt.

Cheers.

Keith