struct TTaskContext
{
PVOID TaskContext;
PVOID StackAddress;
};
This structure defines the architecture-dependent task context descriptor. It serves as the handle to a suspended task's state.
When porting the system to a new architecture, it is recommended to store the actual execution context (CPU registers) on the task's stack rather than inside this structure. In this standard configuration, the TaskContext field holds the current stack pointer (top of the stack), while StackAddress holds the base address of the allocated stack memory (used for deallocation).
A task context is initialized using the arCreateTaskContext function and must be freed using the arReleaseTaskContext function.
| Version: | 1.0 |
|---|---|
| Header file: | AR_API.h |
| See also: | arCreateTaskContext, arReleaseTaskContext, context switching, PVOID |