summaryrefslogtreecommitdiff
path: root/ace/OS.i
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-09 04:28:21 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-09 04:28:21 +0000
commit42dd6fe2be0e1e6cc5a4922baa79a4e4ebebe83b (patch)
treea8a3fda2892d9202787512110935034fb372bf2a /ace/OS.i
parenta4ea4614c5ad8a7afd8e72f3b72dafcc229f5ce5 (diff)
downloadATCD-42dd6fe2be0e1e6cc5a4922baa79a4e4ebebe83b.tar.gz
added ACE_HAS_ALPHA_TIMER support
Diffstat (limited to 'ace/OS.i')
-rw-r--r--ace/OS.i25
1 files changed, 13 insertions, 12 deletions
diff --git a/ace/OS.i b/ace/OS.i
index e13e96853ae..e4228308b7f 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -8567,18 +8567,19 @@ ACE_OS::gethrtime (const ACE_HRTimer_Op op)
# else /* ! ACE_LACKS_LONGLONG_T */
return now;
# endif /* ! ACE_LACKS_LONGLONG_T */
-// #elif defined (linux) && defined (__alpha)
-// NOTE: the following don't seem to work on Linux. Use ::gettimeofday
-// instead.
-// ACE_hrtime_t now;
-//
-// // The following statement is based on code published by:
-// // Mosberger, David, "How to Make Your Applications Fly, Part 1",
-// // Linux Journal Issue 42, October 1997, page 50.
-// // It reads the high-res tick counter directly into memory variable "now".
-// asm volatile ("rpcc %0" : "=r" (now) : : "memory");
-//
-// return now;
+#elif defined (linux) && defined (ACE_HAS_ALPHA_TIMER)
+// NOTE: For unknown reasons, rpcc must load to a 32-bit int on
+// alphas. This severely limits the range of high-res times
+// that can be returned.
+ ACE_UINT32 now;
+
+ // The following statement is based on code published by:
+ // Mosberger, David, "How to Make Your Applications Fly, Part 1",
+ // Linux Journal Issue 42, October 1997, page 50.
+ // It reads the high-res tick counter directly into memory variable "now".
+ asm volatile ("rpcc %0" : "=r" (now) : : "memory");
+
+ return now;
#elif defined (ACE_WIN32) && defined (ACE_HAS_PENTIUM) && !defined (ACE_HAS_WINCE)
// Issue the RDTSC assembler instruction to get the number of clock
// ticks since system boot. RDTSC is only available on Pentiums and