{
int i;
int me = (long)arg;
- cpu_set_t mask;
long long n_reads_local = 0;
- urcu_register_thread();
+ rcu_register_thread();
run_on(me);
- __atomic_inc(&nthreadsrunning);
+ atomic_inc(&nthreadsrunning);
while (goflag == GOFLAG_INIT)
poll(NULL, 0, 1);
mark_rcu_quiescent_state();
}
__get_thread_var(n_reads_pt) += n_reads_local;
put_thread_offline();
- urcu_unregister_thread();
+ rcu_unregister_thread();
return (NULL);
}
{
long long n_updates_local = 0;
- __atomic_inc(&nthreadsrunning);
+ atomic_inc(&nthreadsrunning);
while (goflag == GOFLAG_INIT)
poll(NULL, 0, 1);
while (goflag == GOFLAG_RUN) {
n_updates_local++;
}
__get_thread_var(n_updates_pt) += n_updates_local;
+ return NULL;
}
void perftestinit(void)
int mbtest;
};
-struct rcu_stress rcu_stress_array[RCU_STRESS_PIPE_LEN] = { 0 };
+struct rcu_stress rcu_stress_array[RCU_STRESS_PIPE_LEN] = { { 0 } };
struct rcu_stress *rcu_stress_current;
int rcu_stress_idx = 0;
struct rcu_stress *p;
int pc;
- urcu_register_thread();
+ rcu_register_thread();
while (goflag == GOFLAG_INIT)
poll(NULL, 0, 1);
mark_rcu_quiescent_state();
}
}
put_thread_offline();
- urcu_unregister_thread();
+ rcu_unregister_thread();
return (NULL);
}
synchronize_rcu();
n_updates++;
}
+ return NULL;
}
void *rcu_fake_update_stress_test(void *arg)
{
- int i;
- struct rcu_stress *p;
-
while (goflag == GOFLAG_INIT)
poll(NULL, 0, 1);
while (goflag == GOFLAG_RUN) {
synchronize_rcu();
poll(NULL, 0, 1);
}
+ return NULL;
}
void stresstest(int nreaders)
wait_all_threads();
for_each_thread(t)
n_reads += per_thread(n_reads_pt, t);
- printf("n_reads: %lld n_updates: %ld n_mberror: %ld\n",
+ printf("n_reads: %lld n_updates: %ld n_mberror: %d\n",
n_reads, n_updates, n_mberror);
printf("rcu_stress_count:");
for (i = 0; i <= RCU_STRESS_PIPE_LEN; i++) {