*/
static pthread_mutex_t rcu_registry_lock = PTHREAD_MUTEX_INITIALIZER;
struct urcu_gp rcu_gp = { .ctr = URCU_GP_COUNT };
*/
static pthread_mutex_t rcu_registry_lock = PTHREAD_MUTEX_INITIALIZER;
struct urcu_gp rcu_gp = { .ctr = URCU_GP_COUNT };
/*
* Written to only by each individual reader. Read by both the reader and the
* writers.
*/
DEFINE_URCU_TLS(struct urcu_reader, rcu_reader);
/*
* Written to only by each individual reader. Read by both the reader and the
* writers.
*/
DEFINE_URCU_TLS(struct urcu_reader, rcu_reader);
/*
* Wait for readers to observe original parity or be quiescent.
* wait_for_readers() can release and grab again rcu_registry_lock
/*
* Wait for readers to observe original parity or be quiescent.
* wait_for_readers() can release and grab again rcu_registry_lock
/*
* Wait for readers to observe new parity or be quiescent.
* wait_for_readers() can release and grab again rcu_registry_lock
/*
* Wait for readers to observe new parity or be quiescent.
* wait_for_readers() can release and grab again rcu_registry_lock
- assert(URCU_TLS(rcu_reader).need_mb == 0);
- assert(!(URCU_TLS(rcu_reader).ctr & URCU_GP_CTR_NEST_MASK));
+ urcu_posix_assert(URCU_TLS(rcu_reader).need_mb == 0);
+ urcu_posix_assert(!(URCU_TLS(rcu_reader).ctr & URCU_GP_CTR_NEST_MASK));
URCU_TLS(rcu_reader).registered = 1;
rcu_init(); /* In case gcc does not support constructor attribute */
cds_list_add(&URCU_TLS(rcu_reader).node, ®istry);
mutex_unlock(&rcu_registry_lock);
}
URCU_TLS(rcu_reader).registered = 1;
rcu_init(); /* In case gcc does not support constructor attribute */
cds_list_add(&URCU_TLS(rcu_reader).node, ®istry);
mutex_unlock(&rcu_registry_lock);
}
URCU_TLS(rcu_reader).registered = 0;
cds_list_del(&URCU_TLS(rcu_reader).node);
mutex_unlock(&rcu_registry_lock);
}
URCU_TLS(rcu_reader).registered = 0;
cds_list_del(&URCU_TLS(rcu_reader).node);
mutex_unlock(&rcu_registry_lock);
}
-static void sigrcu_handler(int signo, siginfo_t *siginfo, void *context)
+static void sigrcu_handler(int signo __attribute__((unused)),
+ siginfo_t *siginfo __attribute__((unused)),
+ void *context __attribute__((unused)))
* application exits.
* Assertion disabled because call_rcu threads are now rcu
* readers, and left running at exit.
* application exits.
* Assertion disabled because call_rcu threads are now rcu
* readers, and left running at exit.