Octopus
debug_low.c
Go to the documentation of this file.
1#define _GNU_SOURCE
2
3#include <config.h>
4#include <fenv.h>
5#include <unistd.h>
6
7#ifdef HAVE_VERROU
8#include <valgrind/verrou.h>
9#endif
10
11void debug_verrou_start_instrumentation() {
12#ifdef HAVE_VERROU
13 VERROU_START_INSTRUMENTATION;
14#endif
15}
16
17void debug_verrou_stop_instrumentation() {
18#ifdef HAVE_VERROU
19 VERROU_STOP_INSTRUMENTATION;
20#endif
21}
22
23void debug_fenv_start_instrumentation() {
24#ifdef __GLIBC__
25 feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW);
26#endif
27}
28
29void debug_fenv_stop_instrumentation() {
30#ifdef __GLIBC__
31 fedisableexcept(FE_ALL_EXCEPT);
32#endif
33}
@ FE_DIVBYZERO
Definition: debug_low.c:54
@ FE_INVALID
Definition: debug_low.c:50
@ FE_UNDERFLOW
Definition: debug_low.c:60
@ FE_OVERFLOW
Definition: debug_low.c:57