From: Mathieu Desnoyers Date: Mon, 9 Feb 2009 18:00:31 +0000 (-0500) Subject: Fix data type, should now be long rather than int. X-Git-Tag: v0.1~302 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6e8b8429a09800f5a50f0410f5ec4cd95b46974b;p=urcu.git Fix data type, should now be long rather than int. Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu.c b/urcu.c index 5514b27..53c7f37 100644 --- a/urcu.c +++ b/urcu.c @@ -20,9 +20,9 @@ pthread_mutex_t urcu_mutex = PTHREAD_MUTEX_INITIALIZER; /* Global grace period counter */ -int urcu_gp_ctr; +long urcu_gp_ctr; -int __thread urcu_active_readers; +long __thread urcu_active_readers; /* Thread IDs of registered readers */ #define INIT_NUM_THREADS 4 diff --git a/urcu.h b/urcu.h index b8f6d9b..4249806 100644 --- a/urcu.h +++ b/urcu.h @@ -175,13 +175,13 @@ static inline void debug_yield_init(void) * Using a int rather than a char to eliminate false register dependencies * causing stalls on some architectures. */ -extern int urcu_gp_ctr; +extern long urcu_gp_ctr; -extern int __thread urcu_active_readers; +extern long __thread urcu_active_readers; static inline int rcu_old_gp_ongoing(int *value) { - int v; + long v; if (value == NULL) return 0; @@ -194,7 +194,7 @@ static inline int rcu_old_gp_ongoing(int *value) static inline void rcu_read_lock(void) { - int tmp; + long tmp; debug_yield_read(); tmp = urcu_active_readers;