ABSTRACT

An exception is an asynchronous event or error condition that disrupts the normal flow of thread processing. There are three exception categories in the MIPS architecture, as follows: Exceptions resulting from the direct effect of executing an instruction; exceptions resulting as a side effect of executing an instruction; and exceptions resulting from external interrupts, unrelated to instruction execution. MIPS has a simple exception and interrupt handling architecture. Some implementations of the MIPS architecture add additional interrupt vectors so that each interrupt source can have a separate vector. ThreadX complements the MIPS processor because both are extremely simple to use and are very powerful. The ThreadX initialization typically occurs from inside the application’s main function. ThreadX updates several system variables to indicate the thread is executing, recovers the thread’s saved context, and transfers control back to the thread. The saving of a thread’s context occurs from within several locations inside the ThreadX real-time operating system.