summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMikael Ronstrom <mikael@mysql.com>2008-10-13 21:46:29 +0200
committerMikael Ronstrom <mikael@mysql.com>2008-10-13 21:46:29 +0200
commitc2ad3cada063cbfd6fa30223725177972f763cb9 (patch)
treebe80ccb8c9580c76c1b4367f2dd06035687c487d /storage
parent9daa56fd5ce3ccd33c32b5a505ac1d2b2c437460 (diff)
downloadmariadb-git-c2ad3cada063cbfd6fa30223725177972f763cb9.tar.gz
Sparc prefetch patch
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/include/univ.i9
1 files changed, 9 insertions, 0 deletions
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
index 8ab62e655ff..ec0ef2e9109 100644
--- a/storage/innobase/include/univ.i
+++ b/storage/innobase/include/univ.i
@@ -9,6 +9,10 @@ Created 1/20/1994 Heikki Tuuri
#ifndef univ_i
#define univ_i
+#if ( defined(sun) || defined(__sun) )
+# include <sun_prefetch.h>
+#endif
+
#if (defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)) && !defined(MYSQL_SERVER) && !defined(__WIN__)
# undef __WIN__
# define __WIN__
@@ -274,6 +278,11 @@ it is read. */
/* Minimize cache-miss latency by moving data at addr into a cache before
it is read or written. */
# define UNIV_PREFETCH_RW(addr) __builtin_prefetch(addr, 1, 3)
+#elif ( defined(sun) || defined(__sun) )
+# define UNIV_EXPECT(expr,value) (expr)
+# define UNIV_LIKELY_NULL(expr) (expr)
+# define UNIV_PREFETCH_R(addr) sparc_prefetch_read_many(addr)
+# define UNIV_PREFETCH_RW(addr) sparc_prefetch_write_many(addr)
#else
/* Dummy versions of the macros */
# define UNIV_EXPECT(expr,value) (expr)