Slide 1 Slide 2 Slide 3 Slide 4 Slide 5 Slide 6 Slide 7 Slide 8 Slide 9 Slide 10 Slide 11 Slide 12 Product List
RTOS and Software Interrupts Slide 7

In this example, once again there are two Swis; however, this time they are running at different priorities. In this instance note that there is another twist: instead of the interrupt service routine running as a BIOS Hwi, it is just running as a standard ISR. The diagram shows the lower priority Swi_A running; it gets preempted by the ISR, which in turn posts the higher priority Swi_B. However, instead of Swi_B starting to execute after the ISR completes, it starts to run right away. That is a clear violation of our SYS/BIOS scheduling rules which mandate that Swis should implicitly be considered a lower priority thread than the interrupt processing threads. The reason it happened was because the BIOS scheduler did not know that the ISR was running in the context of a Hwi; as a result, the Swi was run in the same context. The preamble and post-amble code that gets run in BIOS Swis was not present in this case, so bad things were allowed to happen.

PTM Published on: 2012-07-17