diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-10-18 02:22:58 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-10-18 02:22:58 +0000 |
commit | 32f1052eba7a36b0ed24ca372616ac543afa6e31 (patch) | |
tree | 90848cf8c2f2948ab2db78894e72b403f371670f /ace/OS.i | |
parent | 9ec28c523280c46f31e209c78867c7e8b82fcde5 (diff) | |
download | ATCD-32f1052eba7a36b0ed24ca372616ac543afa6e31.tar.gz |
(gethrtime): updated comments on Alpha rpcc instruction.
Diffstat (limited to 'ace/OS.i')
-rw-r--r-- | ace/OS.i | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -8775,15 +8775,18 @@ ACE_OS::gethrtime (const ACE_HRTimer_Op op) return now; # endif /* ! ACE_LACKS_LONGLONG_T */ #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. + // NOTE: alphas only have a 32 bit tick (cycle) counter. The rpcc + // instruction actually reads 64 bits, but the high 32 bits are + // implementation-specific. Linux and Digital Unix, for example, + // use them for virtual tick counts, i.e., taking into account only + // the time that the process was running. This information is from + // David Mosberger's article, see comment below. 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". + // Linux Journal Issue 42, October 1997, page 50. It reads the + // high-res tick counter directly into the memory variable. asm volatile ("rpcc %0" : "=r" (now) : : "memory"); return now; |