X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fctf%2Fiterator.h;h=fe70b5e732258e5a245e151a7a259eb7eaf237f8;hb=b4b292cc76e04e9efda111e492251d8e7aefe451;hp=8f9af0e19e3b8af855f2e3fae71200014b8af16c;hpb=17e0c86ea65fcfef51592628e35efc27392638f2;p=babeltrace.git diff --git a/include/babeltrace/ctf/iterator.h b/include/babeltrace/ctf/iterator.h index 8f9af0e1..fe70b5e7 100644 --- a/include/babeltrace/ctf/iterator.h +++ b/include/babeltrace/ctf/iterator.h @@ -39,10 +39,17 @@ struct bt_ctf_event; * By default, if begin_pos is NULL, a BT_SEEK_CUR is performed at * creation. By default, if end_pos is NULL, a BT_SEEK_END (end of * trace) is the EOF criterion. + * + * Return a pointer to the newly allocated iterator. + * + * Only one iterator can be created against a context. If more than one + * iterator is being created for the same context, the second creation + * will return NULL. The previous iterator must be destroyed before + * creation of the new iterator for this function to succeed. */ struct bt_ctf_iter *bt_ctf_iter_create(struct bt_context *ctx, - struct bt_iter_pos *begin_pos, - struct bt_iter_pos *end_pos); + const struct bt_iter_pos *begin_pos, + const struct bt_iter_pos *end_pos); /* * bt_ctf_get_iter - get iterator from ctf iterator. @@ -57,7 +64,7 @@ void bt_ctf_iter_destroy(struct bt_ctf_iter *iter); /* * bt_ctf_iter_read_event: Read the iterator's current event data. * - * @iter: trace collection iterator (input) + * @iter: trace collection iterator (input). Should NOT be NULL. * * Return current event on success, NULL on end of trace. */