Back to index

glibc  2.9
Functions
feenablxcpt.c File Reference
#include <fenv.h>
#include <fpu_control.h>

Go to the source code of this file.

Functions

int feenableexcept (int excepts)

Function Documentation

int feenableexcept ( int  excepts)

Definition at line 25 of file feenablxcpt.c.

{
  unsigned long int new_exc, old_exc;

  _FPU_GETCW(new_exc);

  old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;

  excepts &= FE_ALL_EXCEPT;

  new_exc |= (excepts << FE_EXCEPT_SHIFT);

  _FPU_SETCW(new_exc);

  return old_exc;
}