summaryrefslogtreecommitdiff
path: root/lib/igt_aux.h
diff options
context:
space:
mode:
authorThomas Wood <thomas.wood@intel.com>2014-10-10 11:20:35 +0100
committerThomas Wood <thomas.wood@intel.com>2014-10-17 15:34:43 +0100
commitbe4710a541b517b5f8663448bffed5656d59b47b (patch)
tree65b5f7c23c98c52f0972e5a43d518292757f9b3e /lib/igt_aux.h
parentd4e3b6a0f5cd759182a53e2bc51a3d3f317a81f0 (diff)
lib: add common min and max macros
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'lib/igt_aux.h')
-rw-r--r--lib/igt_aux.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index d74bb8c4..415614b4 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -83,4 +83,8 @@ bool intel_check_memory(uint32_t count, uint32_t size, unsigned mode);
#define CHECK_RAM 0x1
#define CHECK_SWAP 0x2
+
+#define min(a, b) ((a) < (b) ? (a) : (b))
+#define max(a, b) ((a) < (b) ? (a) : (b))
+
#endif /* IGT_AUX_H */