Fix get_cycles for 32-bits x86
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 9 Feb 2009 17:58:11 +0000 (12:58 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 9 Feb 2009 17:58:11 +0000 (12:58 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
test_rwlock_timing.c
test_urcu_timing.c

index 065c2d34038498b90152fa1d6377d4cf36006f38..6e0523ce0614a5f3e6890460d480774c08974f7a 100644 (file)
@@ -38,7 +38,7 @@ static inline pid_t gettid(void)
 #define rdtscll(val) do { \
      unsigned int __a,__d; \
      asm volatile("rdtsc" : "=a" (__a), "=d" (__d)); \
-     (val) = ((unsigned long)__a) | (((unsigned long)__d)<<32); \
+     (val) = ((unsigned long long)__a) | (((unsigned long long)__d)<<32); \
 } while(0)
 
 typedef unsigned long long cycles_t;
index f97a5c1e3c9a15d3055c596a72a3d4d9e61d3fbc..d469508dedd1361086d025f820ddad9440b2b5ad 100644 (file)
@@ -37,7 +37,7 @@ static inline pid_t gettid(void)
 #define rdtscll(val) do { \
      unsigned int __a,__d; \
      asm volatile("rdtsc" : "=a" (__a), "=d" (__d)); \
-     (val) = ((unsigned long)__a) | (((unsigned long)__d)<<32); \
+     (val) = ((unsigned long long)__a) | (((unsigned long long)__d)<<32); \
 } while(0)
 
 typedef unsigned long long cycles_t;
This page took 0.025946 seconds and 4 git commands to generate.