summaryrefslogtreecommitdiff
path: root/snappy-stubs-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'snappy-stubs-internal.h')
-rw-r--r--snappy-stubs-internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/snappy-stubs-internal.h b/snappy-stubs-internal.h
index 1548ed7..526c38b 100644
--- a/snappy-stubs-internal.h
+++ b/snappy-stubs-internal.h
@@ -105,6 +105,12 @@
#define SNAPPY_ATTRIBUTE_ALWAYS_INLINE
#endif // HAVE_ATTRIBUTE_ALWAYS_INLINE
+#if HAVE_BUILTIN_PREFETCH
+#define SNAPPY_PREFETCH(ptr) __builtin_prefetch(ptr, 0, 3)
+#else
+#define SNAPPY_PREFETCH(ptr) (void)(ptr)
+#endif
+
// Stubbed version of ABSL_FLAG.
//
// In the open source version, flags can only be changed at compile time.