Here, we compare and contrast the highest and lowest priority threads in the system – Hwi and Idle. On the left, we show a “typical” or “non O/S” version of the software. In main(), users do their initialization first and then have a while(1) loop that processes non-realtime events. Why are these non-realtime? Because the while(1) loop will be pre-empted by a higher priority thread – namely any interrupt that occurs. When those interrupts occur, they are processed in a vector table and then a branch occurs to the proper ISR based on the interrupt number.
đang được dịch, vui lòng đợi..