BOOL arSetPreemptiveHandler( TPreemptiveProc PreemptiveProc, SIZE StackSize );
Pointer to the preemption handler function (or NULL to disable the current handler).
The size of the stack, in bytes, required for the execution of the preemptive procedure.
Returns TRUE on success or FALSE on failure. Use the stGetLastError function to obtain extended error information.
This function registers a handler for the preemption service routine and allocates a dedicated execution context for its use.
The preemption handler typically serves as the entry point for the operating system scheduler. The function prototype is defined by the TPreemptiveProc type. Please refer to the type definition for further details.
Certain architectures, such as ARM, inherently provide a dedicated stack for normal interrupt (IRQ) processing. On these platforms, creating a separate software context is unnecessary. Consequently, the stack size is defined during system startup, and the StackSize parameter passed to this function is ignored.
| Version: | 1.0 |
|---|---|
| Header file: | AR_API.h |
| See also: | arCreateTaskContext, BOOL, context switching, FALSE, NULL, operating system scheduler, SIZE, stGetLastError, TPreemptiveProc, TRUE |