API phased-out.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
for (;;) {
new = test_array_alloc();
new->a = 8;
- old = rcu_publish_content(&test_rcu_pointer, new);
+ old = rcu_xchg_pointer(&test_rcu_pointer, new);
+ synchronize_rcu();
/* can be done after unlock */
if (old)
old->a = 0;
assert(old->a == 8);
}
new->a = 8;
- old = _rcu_publish_content(&test_rcu_pointer, new);
+ old = rcu_xchg_pointer(&test_rcu_pointer, new);
rcu_copy_mutex_unlock();
+ synchronize_rcu();
/* can be done after unlock */
if (old) {
old->a = 0;
for (;;) {
new = test_array_alloc();
new->a = 8;
- old = rcu_publish_content(&test_rcu_pointer, new);
+ old = rcu_xchg_pointer(&test_rcu_pointer, new);
+ synchronize_rcu();
if (old)
old->a = 0;
test_array_free(old);
for (;;) {
new = test_array_alloc();
new->a = 8;
- old = rcu_publish_content(&test_rcu_pointer, new);
+ old = rcu_xchg_pointer(&test_rcu_pointer, new);
+ synchronize_rcu();
if (old)
old->a = 0;
test_array_free(old);
assert(old->a == 8);
}
new->a = 8;
- old = rcu_publish_content(&test_rcu_pointer, new);
+ old = rcu_xchg_pointer(&test_rcu_pointer, new);
rcu_copy_mutex_unlock();
+ synchronize_rcu();
/* can be done after unlock */
if (old) {
old->a = 0;