printk("r_parent insert off is now %u\n",
r_parent.insert_off);
printk("Looks like there is a right sibling\n");
- } else if (parent.insert_off) {
+ } else if (!force_more && parent.insert_off) {
printk("%d: set src %u\n", __LINE__, s);
src[0] = &other;
s++;
printk("set dst %u max %lu\n", d, dst[d].max);
d++;
printk("dst ++\n");
+ if ((d > 2) && (sd.offset <= sd.new_end)) {
+ mt_dump(mas->tree, mt_dump_dec);
+ printk("d will be out of range\n");
+ fflush(stdout);
+ }
}
/* Source exhausted */
unsigned long index[RCU_RANGE_COUNT];
unsigned long last[RCU_RANGE_COUNT];
+ pthread_mutex_t dump;
};
struct rcu_test_struct3 {
line = __LINE__;
if (mas.index != r_start) {
+ if (pthread_mutex_trylock(&test->dump) != 0) {
+ rcu_read_unlock();
+ goto quit;
+ }
+
alt = xa_mk_value(index + i * 2 + 1 +
RCU_RANGE_COUNT);
mt_dump(test->mt, mt_dump_dec);
usleep(test->pause);
}
+quit:
rcu_unregister_thread();
return NULL;
}
test.seen_modified = 0;
test.thread_count = 0;
test.start = test.stop = false;
+ pthread_mutex_init(&test.dump, NULL);
seed = time(NULL);
srand(seed);
for (i = 0; i < RCU_RANGE_COUNT; i++) {