
SCIOPTA - Real-Time Kernel
User’s Manual Manual Version 4.1 5-5
SCIOPTA - Real-Time Kernel
5 Processes
5.7 Interrupt Processes
An interrupt is a system event generated by a hardware device. The CPU will suspend the actually running program
and activate an interrupt service routine assigned to that interrupt.
The programs which handle interrupts are called interrupt processes in
SCIOPTA. SCIOPTA is channelling inter-
rupts internally and calls the appropriate in
terrupt process.
Interrupt process is the fastest process type in SCIOPTA and
will respond almost immediately to events. As the
system is blocked during interrupt handling interrupt processes must perform their task in the shortest time possi-
ble.
A typical example is the control of a serial line. Receiving incoming characters
might be handled by an interrupt
process by storing the incoming arrived characters in a local buffer returning after each storage of a character. If
this takes too long characters will be lost. If a defined number of characters of a message have been received the
whole message will be transferred to a prioritized process which has more time to analyse the data.
In some SCIOPTA systems there might be two type of interrupt processes. Interrupt processes of type Sci
opta are
handled by the kernel and may use (not blocking) system calls while interrupt processes of type User are handled
outside the kernel and may not use system calls.
5.7.1 Creating and Declaring Interrupt Processes
Static interrupt processes are defined in the SCIOPTA configuration utility (SCONF) and created by the kernel au-
tomatically at system startup. See also chapter
16.12 “Creating Processes and Pools” on page 16-18.
Dynamic interrupt process are created
by using the sc_procIntCreate system call and killed dynamically with the
sc_procKill system call.
5.7.2 Interrupt Process Priorities
The priority of an interrupt process is assigned by hardware of the interrupt source. Whenever an interrupt occurs
the assigned interrupt process is called, assuming that no other interrupt of higher priority is running. If the interrupt
process with higher priority has completed his work, the interrupt process of lower priority can continue.
5.7.3 Writing Interrupt Processes
5.7.3.1 Interrupt Process Declaration Syntax
All interrupt processes in SCIOPTA must contain the following declaration:
SC_INT_PROCESS (<proc_name>, <irq_src>)
{
/* Code for interrupt process <proc_name> */
}
Kommentare zu diesen Handbüchern