From: Mathieu Desnoyers Date: Mon, 9 Feb 2009 17:58:11 +0000 (-0500) Subject: Fix get_cycles for 32-bits x86 X-Git-Tag: v0.1~304 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5fa9dfe40762818f355720a66b62700af5aafc28;p=urcu.git Fix get_cycles for 32-bits x86 Signed-off-by: Mathieu Desnoyers --- 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;