Patent ID: 7647600

Claim:
A computer-implemented method for a direct call of a target function, comprising: utilizing a computer to implement: executing a start function of a first task to perform a context switch from a first memory context into a second memory context, wherein the first task is executed on a processor with a memory management unit (MMU) in the computer, wherein the computer is operated by an operating system, wherein the processor includes a MMU control register, wherein the start function is a component of the first task with the first memory context, and wherein the target function is a component of a second task with the second memory context, and wherein the first task executing the start function to perform a context switch from the first memory context into the second memory context comprises: deactivating by the start function an interrupt handling by the operating system to prevent task switching by the operating system during execution of the target function; and writing by the start function in the first task a physical address of the second memory context of the second task containing the target function into the MMU control register, thereby replacing an original physical address of the first memory context; directly calling by the start function in the first task the target function in the second context based on the physical address of the second memory context in the MMU control register, thereby executing the target function in the second memory context; and reversing by the start function the context switch to return to the first memory context after executing the target function, comprising: writing by the start function the original address of the first memory context into the MMU control register; and reactivating by the start function the interrupt handling by the operating system.