Back to index

glibc  2.9
Functions
fsetexcptflg.c File Reference
#include <fenv.h>
#include <math.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 __fesetexceptflag (const fexcept_t *flagp, int excepts)
 versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2)

Function Documentation

int __fesetexceptflag ( const fexcept_t flagp,
int  excepts 
)

Definition at line 30 of file fsetexcptflg.c.

{
  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
    {
      fexcept_t temp;

      /* Get the current environment.  */
      _FPU_GETCW (temp);

      /* Set the desired exception mask.  */
      temp &= ~(excepts & FE_ALL_EXCEPT);
      temp |= (*flagp & excepts & FE_ALL_EXCEPT);

      /* Save state back to the FPU.  */
      _FPU_SETCW (temp);

      /* Success.  */
      return 0;
    }

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