Back to index

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

Go to the source code of this file.

Functions

int __feclearexcept (int excepts)
 versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2)

Function Documentation

int __feclearexcept ( int  excepts)

Definition at line 29 of file fclrexcpt.c.

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

      /* Mask out unsupported bits/exceptions.  */
      excepts &= FE_ALL_EXCEPT;

      /* Get the current floating point status. */
      _FPU_GETCW (temp);

      /* Clear the relevant bits.  */
      temp = (temp & ~FE_ALL_EXCEPT) | (temp & FE_ALL_EXCEPT & ~excepts);

      /* Put the new data in effect.  */
      _FPU_SETCW (temp);

      /* Success.  */
      return 0;
    }

  /* Unsupported, so fail.  */
  return 1;
}
versioned_symbol ( libm  ,
__feclearexcept  ,
feclearexcept  ,
GLIBC_2_2   
)