+
+ if (atom == last)
+ break;
+
+ atom = atom->next;
+ } while (1);
+
+ assert(!last->next);
+}
+
+/*
+ * Inspect the ring to see if we have completed events
+ */
+static void fio_syslet_complete(struct thread_data *td)
+{
+ struct syslet_data *sd = td->io_ops->data;
+
+ do {
+ struct syslet_uatom *atom;
+
+ atom = sd->ring[sd->ahu.user_ring_idx];
+ if (!atom)
+ break;
+
+ sd->ring[sd->ahu.user_ring_idx] = NULL;
+ if (++sd->ahu.user_ring_idx == td->iodepth)
+ sd->ahu.user_ring_idx = 0;
+
+ fio_syslet_complete_atom(td, atom);