(C) 1998 AROS - The Amiga Research OS


NAME

APTR PrepareContext (stackPointer , entryPoint , fallBack)

LOCATION
In SysBase at offset 6

SYNOPSIS
APTR stackPointer
APTR entryPoint
APTR fallBack

FUNCTION
Allocates the space required to hold a new set of registers on the stack given by stackPointer and clears the area except the for the PC which is set to the address given by entryPoint. The stack will be set so that when the entryPoint function returns, the fallback function will be called.

INPUTS
stackPointer
Pointer to specific stack.
entryPoint
Function to call when the new context comes alive.
fallBack
Address of the function to be called when the entryPoint function returns.

RESULT
The new stackPointer with the context saved.

EXAMPLE

SEE ALSO
Dispatch()

NOTES
This function is very CPU dependant. In fact it can differ over different models of the same processor family.

BUGS

INTERNALS
This function is required to be implemented in the $(KERNEL).

HISTORY