Prepares for a delayed interrupt.
This function takes a function and two parameters. The function will be called, the two parameters passed to it. If this function is called from an interrupt routine then the parameter function will be called when the interrupt routine returns. If the function is called from a user process, then the parameter function will be called immediately but it will be executed in the kernel's context. If this function is called from the kernel's context, then it is equivalent of simply calling the argument function directly.
While the argument function is running interrupts may or may not be enabled, depending on the state of the kernel's event queue. However, the argument function is guaranteed to run for completion before any other delayed interrupt functions are called.
- Parameters:
-
| func | The function to call |
| par1 | The first argument for the called function |
| par2 | The second argument for the called function |
- Return values:
-
| 1 | This call always succeeds |