return NULL;
}
+/*
+ * There are always either 1 or 2 objects in the IDR. If we find nothing,
+ * or we find something at an ID we didn't expect, that's a bug.
+ */
void idr_find_test_1(int anchor_id, int throbber_id)
{
pthread_t throbber;
int id = 0;
void *entry = idr_get_next(&find_idr, &id);
rcu_read_unlock();
- BUG_ON(entry != xa_mk_value(id));
+ if ((id != anchor_id && id != throbber_id) ||
+ entry != xa_mk_value(id)) {
+ printf("%s(%d, %d): %p at %d\n", __func__, anchor_id,
+ throbber_id, entry, id);
+ abort();
+ }
rcu_read_lock();
} while (time(NULL) < start + 11);
rcu_read_unlock();