summaryrefslogtreecommitdiff
path: root/tune/time.c
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2002-03-23 21:55:53 +0100
committerKevin Ryde <user42@zip.com.au>2002-03-23 21:55:53 +0100
commitaf4131a1cc0b155716130fe50ad8c95846afcb42 (patch)
tree4d2c291d06b5b1c6b0b3854c9a1b6dfe1f8f41a4 /tune/time.c
parent2292bcdec6575b1c90db59f3174bb4d382b1e1af (diff)
downloadgmp-af4131a1cc0b155716130fe50ad8c95846afcb42.tar.gz
Avoid cray syssgi():
* tune/time.c: Add SGI hardware counter measuring method
Diffstat (limited to 'tune/time.c')
-rw-r--r--tune/time.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tune/time.c b/tune/time.c
index 6f93adc21..7c0842ca2 100644
--- a/tune/time.c
+++ b/tune/time.c
@@ -225,7 +225,8 @@ typedef unsigned long stck_t; /* dummy */
#endif
#define STCK_PERIOD (1.0 / 4096e6) /* 2^-12 microseconds */
-#if HAVE_SYSSGI
+/* Cray vector systems have syssgi(), but not mmap(). */
+#if HAVE_SYSSGI && HAVE_MMAP
static const int have_sgi = 1;
#else
static const int have_sgi = 0;
@@ -625,7 +626,7 @@ volatile unsigned *sgi_addr;
int
sgi_works_p (void)
{
-#if HAVE_SYSSGI
+#if HAVE_SYSSGI && HAVE_MMAP
static int result = -1;
size_t pagesize, offset;
@@ -702,7 +703,7 @@ sgi_works_p (void)
result = 1;
return result;
-#else /* ! HAVE_SYSSGI */
+#else /* ! (HAVE_SYSSGI && HAVE_MMAP) */
return 0;
#endif
}