summaryrefslogtreecommitdiffstats
path: root/src/idxset.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/idxset.h')
-rw-r--r--src/idxset.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/idxset.h b/src/idxset.h
index f649e23e..fdcb7b54 100644
--- a/src/idxset.h
+++ b/src/idxset.h
@@ -18,8 +18,15 @@ void* idxset_get_by_data(struct idxset*s, void *p, uint32_t *index);
void* idxset_remove_by_index(struct idxset*s, uint32_t index);
void* idxset_remove_by_data(struct idxset*s, void *p, uint32_t *index);
+/* This may be used to iterate through all entries. When called with
+ an invalid index value it returns the first entry, otherwise the
+ next following. The function is best called with *index =
+ IDXSET_VALID first. */
void* idxset_rrobin(struct idxset *s, uint32_t *index);
+/* Return the oldest entry in the idxset */
+void* idxset_first(struct idxset *s, uint32_t *index);
+
int idxset_foreach(struct idxset*s, int (*func)(void *p, uint32_t index, int *del, void*userdata), void *userdata);
unsigned idxset_ncontents(struct idxset*s);