Interrupt servicing in userspace
AssigneeMarvell Asia Pte Ltd
InventorsAlexander Belits, Prasun Kapoor
Life of this patent
Estimating the term…
Abstract
A method for handling an interrupt includes receiving, in hardware or in firmware, a request from a task executing in userspace, where the request is to assign a function in the task and state information for the task to an interrupt. The hardware or firmware records the state information for the task, and assigns defined state information for the function to an event caused by the interrupt. When the interrupt occurs, the interrupt is serviced by saving context including the state information for the task in the memory, loading the defined state information for the function into registers, running the function, and then returning to the task preempted by the interrupt.
Claims20
A method, comprising:
- receiving a request sent by a task executing in userspace, wherein the request is to assign a function that is in the task in the userspace and state information for the task to an interrupt that can preempt the task;
- recording the state information for the task and assigning the recorded state information for the task to an event caused by the interrupt;
- servicing the interrupt, wherein said servicing the interrupt comprises:
- saving context including the state information for the task in memory;
- loading defined state information for the function into registers;
- and
- running the function, wherein during said running, the function accesses the defined state information for the function in the registers;
- and
- returning to the task preempted by the interrupt.
A system, comprising:
- a central processing unit (CPU);
- and
- memory coupled to the CPU, wherein the memory comprises userspace and kernel space;
- wherein the system is operable for executing instructions that, when executed, perform operations comprising:
- receiving a request sent by a task executing in the userspace, wherein the request is to assign a function that is in the task in the userspace and state information for the task to an interrupt that can preempt the task;
- recording the state information for the task and assigning the recorded state information for the task to an event caused by the interrupt;
- servicing the interrupt, said servicing the interrupt comprising:
- saving context including the state information for the task in the memory;
- loading defined state information for the function into registers;
- and
- running the function, wherein during said running, the function accesses the defined state information for the function in the registers;
- and
- returning to the task preempted by the interrupt.
A non-transitory computer-readable medium having computer-readable instructions stored thereon which, when executed by a processor, cause the processor to execute a method comprising:
- receiving a request sent by a task executing in userspace, wherein the request is to assign a function that is in the task in the userspace and state information for the task to an interrupt that can preempt the task;
- recording the state information for the task;
- assigning the recorded state information for the task to an event that triggers the interrupt;
- servicing the interrupt, said servicing the interrupt comprising:
- saving context including the state information for the task in memory;
- loading defined state information for the function into registers;
- and
- running the function, wherein during said running, the function accesses the defined state information for the function in the registers;
- and
- returning to the task preempted by the interrupt.
Dependencies are inferred from the claim text.