NAME | SYNOPSIS | API RESTRICTIONS | FEATURE | DESCRIPTION | RETURN VALUES | ERRORS | RESTRICTIONS | ATTRIBUTES | SEE ALSO
#include <exec/chFpuCtx.h>KnError svFpuContext(KnFpuCtx *oldctx, KnFpuCtx *newctx);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
CORE
The svFpuContext() system call gets or sets the Floating Point Unit execution context of the current thread.
The oldCtx and newCtx parameters must be pointers to KnFpuCtx structures defined in the <exec/chFpuCtx_f.h> header file. The fields of this structure are machine-dependent. A thread's FPU context is defined as the set of floating point unit register values, the floating point unit control and status registers and possibly family specific additional flags required for FP management.
The thread's current FPU execution context is copied into the structure pointed to by oldCtx (if not NULL) in the client address space. The thread's new context is taken from the structure pointed to by newCtx (if not NULL).
The initial thread's FPU context can be set at creation time with threadCreate(2K).
This call is typically intended to be used in handlers to deal with floating point exceptions.
On successful completion, a value of 0 is returned. Otherwise, a negative error code is returned.
The current actor must be a SUPERVISOR actor.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | API RESTRICTIONS | FEATURE | DESCRIPTION | RETURN VALUES | ERRORS | RESTRICTIONS | ATTRIBUTES | SEE ALSO