#define GOFLAG_RUN 1
#define GOFLAG_STOP 2
-int goflag __attribute__((__aligned__(CAA_CACHE_LINE_SIZE))) = GOFLAG_INIT;
+volatile int goflag __attribute__((__aligned__(CAA_CACHE_LINE_SIZE)))
+ = GOFLAG_INIT;
#define RCU_READ_RUN 1000
rcu_register_thread();
run_on(me);
uatomic_inc(&nthreadsrunning);
+ put_thread_offline();
while (goflag == GOFLAG_INIT)
poll(NULL, 0, 1);
- mark_rcu_quiescent_state();
+ put_thread_online();
while (goflag == GOFLAG_RUN) {
for (i = 0; i < RCU_READ_RUN; i++) {
rcu_read_lock();
if ((random() & 0xf00) == 0) {
struct call_rcu_data *crdp;
- crdp = create_call_rcu_data(0);
+ crdp = create_call_rcu_data(0, -1);
if (crdp != NULL) {
fprintf(stderr,
"Using per-thread call_rcu() worker.\n");
int pc;
rcu_register_thread();
+ put_thread_offline();
while (goflag == GOFLAG_INIT)
poll(NULL, 0, 1);
- mark_rcu_quiescent_state();
+ put_thread_online();
while (goflag == GOFLAG_RUN) {
rcu_read_lock();
p = rcu_dereference(rcu_stress_current);
if ((random() & 0xf00) == 0) {
struct call_rcu_data *crdp;
- crdp = create_call_rcu_data(0);
+ crdp = create_call_rcu_data(0, -1);
if (crdp != NULL) {
fprintf(stderr,
"Using per-thread call_rcu() worker.\n");