Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
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
* 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;
static inline void rcu_read_lock(void)
{
- int tmp;
+ long tmp;
debug_yield_read();
tmp = urcu_active_readers;