fpsim(2)
NAME
fpsim − report or change the status of floating point simulation
SYNTAX
int fpsim(flag)
int flag;
DESCRIPTION
The fpsim system call is used to enable, disable, or get the status of the kernel floating point simulator. If flag is 2, the current status of the simulator is returned. The return value will be either 0, 1, or 2 (disabled, enabled, or not configured, respectively).
If flag is 0 or 1 the simulator is respectively disabled or enabled, and the old status of the simulator is returned.
RESTRICTIONS
Only the superuser is allowed to change the status of the simulator.
This call is only temporary, it is intended only for use if the kernel floating point simulator should blow up. Once it has been more thoroughly tested and verified there will no longer be a need to be able to turn it off on a running system.
RETURN VALUE
If unsuccessful, returns a −1, and the global variable errno indicates the error code.
DIAGNOSTICS
The fpsim call will fail if:
[EPERM] The effective user ID of the calling process is not the superuser.
[ENODEV] The simulator is not configured into the current system.
[EINVAL] A mode other than 0, 1 or 2 was specified.