Back to index

glibc  2.9
Functions
fgetexcptflg.c File Reference
#include <fenv_libc.h>
#include <fpu_control.h>

Go to the source code of this file.

Functions

int fegetexceptflag (fexcept_t *flagp, int excepts)

Function Documentation

int fegetexceptflag ( fexcept_t flagp,
int  excepts 
)

Definition at line 25 of file fgetexcptflg.c.

{
  fexcept_t temp, newexcepts;

  /* Get the current exceptions.  */
  _FPU_GETCW (temp);
  newexcepts = (excepts << FPC_DXC_SHIFT) | (excepts << FPC_FLAGS_SHIFT);
  *flagp = temp & newexcepts;

  /* Success.  */
  return 0;
}