Interrupt handling method, computer system, and non-transitory storage medium that resumes waiting threads in response to interrupt signals from I/O devices
AssigneeMitsubishi Electric Corporation
InventorsNikam Tanajirao Vijay, Patwardhan Kunal
Life of this patent
Estimating the term…
Abstract
The present invention provides an interrupt handling system for handling interrupts in a computer system is provided. The interrupt handling system captures and processes the interrupts in a user space of the computer system. The present invention also provides for an interrupt registration method that facilitates interrupt handling in the user space during porting of user applications from one platform to another.
Claims18
An interrupt handling method for a computer system to execute an interrupt handling program on a second platform, the interrupt handling program being created on a first platform, the method comprising:
- storing an interrupt number and corresponding interrupt service routine in a memory of the computer system, wherein the interrupt number corresponds to an input/output device coupled with the computer system;
- determining a user space input/output device number on a basis of the interrupt number, wherein the user space input/output device number corresponds to the input/output device;
- determining a memory location of the input/output device on the basis of the determined user space input/output device number;
- initiating the input/output device for reading, on the basis of the determined memory location;
- creating a thread corresponding to the input/output device;
- and
- placing the thread in a wait state for receiving an interrupt signal from the input/output device, wherein the interrupt signal corresponds to an interrupt generated by the input/output device;
- receiving the interrupt signal from the input/output device;
- executing the interrupt service routine in a kernel space within the memory in response to receiving the interrupt signal;
- resuming the thread from wait state on the basis of the interrupt service routine;
- and
- executing a user-defined function corresponding to the interrupt signal, in a user space within the memory.
A computer system including a memory storing instructions and having a user space and a kernel space, and a computing device coupled with the memory, the computing device comprising a processor which executes the instructions which cause the computing device to:
- store an interrupt number and corresponding interrupt service routine in the memory, wherein the interrupt number corresponds to an input/output device coupled with the computer system;
- determine a user space input/output device number on a basis of the interrupt number, wherein the user space input/output device number corresponds to the input/output device;
- determine a memory location of the input/output device on the basis of the determined user space input/output device number;
- initiate the I/O device for reading, on the basis of the determined memory location;
- create a thread corresponding to the input/output device;
- place the thread in a wait state to receive an interrupt signal from the input/output device, wherein the interrupt signal corresponds to an interrupt generated by the input/output device;
- receive the interrupt signal from the input/output device;
- execute the interrupt service routine in the kernel space in response to receiving the interrupt signal;
- resume the thread from wait state on the basis of interrupt service routine;
- and
- execute a user-defined function corresponding to the interrupt signal, in the user space.
A non-transitory storage medium storing a program for causing a computer system including a computing device to execute an interrupt handling program on a second platform, the interrupt handling program being created on a first platform, wherein the program causes the computing device to perform the operations of:
- storing an interrupt number and corresponding interrupt service routine in a memory coupled with the computing device, wherein the interrupt number corresponds to an input/output device coupled with the computer system;
- determining a user space input/output device number on a basis of the interrupt number, wherein the user space input/output device number corresponds to the input/output device;
- determining a memory location of the input/output device on the basis of the determined user space input/output device number;
- initiating the input/output device for reading, on the basis of the determined memory location;
- creating a thread corresponding to the input/output device;
- placing the thread in a wait state for receiving an interrupt signal from the input/output device, wherein the interrupt signal corresponds to an interrupt generated by the input/output device;
- receiving the interrupt signal from the input/output device;
- executing the interrupt service routine in a kernel space within the memory in response to receiving the interrupt signal;
- resuming the thread from wait state on the basis of the interrupt service routine;
- and
- executing a user-defined function corresponding to the interrupt signal, in a user space within the memory.
Dependencies are inferred from the claim text.