aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/fpmath.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/litmus/fpmath.h')
-rw-r--r--include/litmus/fpmath.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/litmus/fpmath.h b/include/litmus/fpmath.h
index 642de98542c8..3d545fd2f5c5 100644
--- a/include/litmus/fpmath.h
+++ b/include/litmus/fpmath.h
@@ -1,11 +1,12 @@
1#ifndef __FP_MATH_H__ 1#ifndef __FP_MATH_H__
2#define __FP_MATH_H__ 2#define __FP_MATH_H__
3 3
4#ifdef __KERNEL__
4#include <linux/math64.h> 5#include <linux/math64.h>
5 6#else
6#ifndef __KERNEL__
7#include <stdint.h> 7#include <stdint.h>
8#define abs(x) (((x) < 0) ? -(x) : x) 8#define abs(x) (((x) < 0) ? -(x) : x)
9#define div64_s64(a, b) (a)/(b)
9#endif 10#endif
10 11
11// Use 64-bit because we want to track things at the nanosecond scale. 12// Use 64-bit because we want to track things at the nanosecond scale.