arSetPreemptiveHandler function
Declaration:
BOOL arSetPreemptiveHandler(
  TPreemptiveProc PreemptiveProc,
  SIZE StackSize
);
Parameters:
PreemptiveProc

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

StackSize

Stack size expected for preemptive procedure call.

Return value:

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

Description:

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