From 5fa9dfe40762818f355720a66b62700af5aafc28 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 9 Feb 2009 12:58:11 -0500 Subject: [PATCH] Fix get_cycles for 32-bits x86 Signed-off-by: Mathieu Desnoyers --- test_rwlock_timing.c | 2 +- test_urcu_timing.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test_rwlock_timing.c b/test_rwlock_timing.c index 065c2d3..6e0523c 100644 --- a/test_rwlock_timing.c +++ b/test_rwlock_timing.c @@ -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; diff --git a/test_urcu_timing.c b/test_urcu_timing.c index f97a5c1..d469508 100644 --- a/test_urcu_timing.c +++ b/test_urcu_timing.c @@ -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; -- 2.34.1