arSetPreemptiveHandler function
BOOL arSetPreemptiveHandler(
  TPreemptiveProc PreemptiveProc,
  SIZE StackSize

Handler of the preemption service routine (or NULL to disable previous).


Stack size expected for preemptive procedure call.

Return value:

TRUE on success or FALSE on failure. Use stGetLastError function to obtain extended error information.


Sets handler of preemption support routine and allocates a now context for its individual use.

The handler of preemption support routine is a pointer to the operating system scheduler routine. Type of this function is defined by TPreemptiveProc type. For more details please refer to its description.

Some architectures like ARM, already have individual stack for normal interrupt (IRQ) processing, so it do not need to create a new task context. In this case, the stack size must be specified at startup and the StackSize parameter is ignored.

SpaceShadow documentation