Back to index

glibc  2.9
Functions
fesetenv.c File Reference
#include <fenv_libc.h>
#include <fpu_control.h>
#include <stddef.h>
#include <asm/ptrace.h>
#include <sys/ptrace.h>
#include <unistd.h>

Go to the source code of this file.

Functions

int fesetenv (const fenv_t *envp)

Function Documentation

int fesetenv ( const fenv_t envp)

Definition at line 29 of file fesetenv.c.

{
  fenv_t env;

  if (envp == FE_DFL_ENV)
    {
      env.fpc = _FPU_DEFAULT;
      env.ieee_instruction_pointer = 0;
    }
  else if (envp == FE_NOMASK_ENV)
    {
      env.fpc = FPC_EXCEPTION_MASK;
      env.ieee_instruction_pointer = 0;
    }
  else
    env = (*envp);

  _FPU_SETCW (env.fpc);

  /* Success.  */
  return 0;
}