Back to index

glibc  2.9
Functions
feholdexcpt.c File Reference
#include <fenv.h>
#include <fpu_control.h>
#include <unistd.h>
#include <ldsodefs.h>
#include <dl-procinfo.h>
#include <sysdep.h>

Go to the source code of this file.

Functions

int feholdexcept (fenv_t *envp)

Function Documentation

int feholdexcept ( fenv_t envp)

Definition at line 29 of file feholdexcpt.c.

{
  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
    {
      unsigned long int temp;

      /* Store the environment.  */
      _FPU_GETCW(temp);
      envp->__cw = temp;

      /* Now set all exceptions to non-stop.  */
      temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);

      /* And clear all exception flags.  */
      temp &= ~FE_ALL_EXCEPT;

      _FPU_SETCW(temp);

      return 0;
    }

  /* Unsupported, so fail.  */
  return 1;
}