summaryrefslogtreecommitdiff
path: root/ace/OS.i
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-24 17:33:10 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-24 17:33:10 +0000
commit5acab0b138af842aed7d24c8e73c94dbb8f56fbf (patch)
tree8011c35489234403c26f37fd3027cd517d519b63 /ace/OS.i
parent320bd49e23651d520f83a1bf0b4473c8119fce64 (diff)
downloadATCD-5acab0b138af842aed7d24c8e73c94dbb8f56fbf.tar.gz
(gethrtime): with Pentium and g++ or ghs, only; fixed load of 64-bit tick count into two 4-byte ints
Diffstat (limited to 'ace/OS.i')
-rw-r--r--ace/OS.i17
1 files changed, 9 insertions, 8 deletions
diff --git a/ace/OS.i b/ace/OS.i
index 6970afb4db6..a5ffde5bb26 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -6654,12 +6654,12 @@ ACE_OS::dlerror (void)
ACE_OSCALL_RETURN (::strerror(errno), char *, 0);
# elif defined (ACE_WIN32)
static char buf[128];
- FormatMessageA (FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- GetLastError (),
- 0,
+ FormatMessageA (FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ GetLastError (),
+ 0,
buf,
- sizeof buf,
+ sizeof buf,
NULL);
return buf;
# else
@@ -8122,9 +8122,10 @@ ACE_OS::gethrtime (const ACE_HRTimer_Op op)
asm volatile ("rdtsc" : "=A" (now) : : "memory");
# if defined (ACE_LACKS_LONGLONG_T)
- unsigned int least, most;
- ACE_OS::memcpy (&least, &now, sizeof (unsigned int));
- ACE_OS::memcpy (&most, &now + sizeof (unsigned int), sizeof (unsigned int));
+ ACE_UINT32 least, most;
+ ACE_OS::memcpy (&least, &now, sizeof (ACE_UINT32));
+ ACE_OS::memcpy (&most, (unsigned char *) &now + sizeof (ACE_UINT32),
+ sizeof (ACE_UINT32));
ACE_hrtime_t ret (least, most);
return ret;