1.1. Interrupt Service
Hardware interrupt processing in real-time systems is critical because it is in an interrupt mode to inform the system's external event. To quickly respond to interrupts, the interrupt service program ISR runs in a specific space, unlike any other task, so the interrupt handles do not have a context switching of the task.
Interrupt function:
INTCONNECT () links C functions and interrupt vector
INTCOUNT () gets the current interrupt set depth
INTLEVELSET () setup program interrupt level
INTLOCK () makes it disrupts
INTUNLOCK () open interrupt
intVecset () set exception vector
INTVECGET () get an exception vector
All interrupt service sergers use the same interrupt stack, which has been assigned and initialized according to the specific configuration parameters when the system is started, and it must ensure that it can meet the worst multi-interrupt. Interrupt also has a defect: ISR does not run in a regular task context, which does not have a task control block. The basic constraints of the ISR are those that they cannot activate those that may cause the calling program block, for example, it cannot get the semaphore, because the signal is not available, the core will try to let the caller switch to the suspension state. However, ISR can give a signal.
An ISR is usually communicating with one or more tasks, and there is a direct connection as part of an input and output transaction. The nature of this communication is the execution of the driving task, thereby processing interrupts and various situations. This is basically the same as the communication and synchronization of the task to the task, but there are two points difference:
Ÿ A ISR usually acts as a communication or synchronized initiator, which usually returns a semaphore, sending a packet or event to a queue to a task. ISR rarely uses a recipient of information, which is not allowed to wait for receiving packets or events.
Ÿ
ISR
The internal system call always returns immediately
ISR
itself. For example, even
ISR
By sending information, you will wake up a high priority task, and it must first return.
ISR
. This is because
ISR
It must be completed first.