-/** @} */
-/** @defgroup XBT_dynar_cursor Cursors on dynar
- * @ingroup XBT_dynar
- *
- * Cursors are used to iterate over the structure. Never add elements to the
- * DynArr during the traversal. To remove elements, use the
- * xbt_dynar_cursor_rm() function.
- *
- * Do not call these functions directly, but only the xbt_dynar_foreach macro.
- *
- * For synchronized dynars, the dynar will be locked during the whole
- * loop and it will get unlocked automatically if you traverse all
- * elements. If you want to break the loop before the end, make sure
- * to call xbt_dynar_cursor_unlock() before the <tt>break;</tt>
- *
- * @{
- */
-
-XBT_PUBLIC(void) xbt_dynar_cursor_rm(xbt_dynar_t dynar,
- unsigned int *const cursor);
-XBT_PUBLIC(void) xbt_dynar_cursor_unlock(xbt_dynar_t dynar);
-
-/* do not use this structure internals directly, but use the public interface
- * This was made public to allow:
- * - the inlining of the foreach elements
- * - sending such beasts over the network
- */
-
-#include "xbt/synchro_core.h"
-typedef struct xbt_dynar_s {
- unsigned long size;
- unsigned long used;
- unsigned long elmsize;
- void *data;
- void_f_pvoid_t free_f;
-} s_xbt_dynar_t;
-
-static XBT_INLINE void
-_xbt_dynar_cursor_first(const xbt_dynar_t dynar,
- unsigned int *const cursor)
-{
- /* iterating over a NULL dynar is a no-op (but we don't want to have uninitialized counters) */
-
- //XBT_DEBUG("Set cursor on %p to the first position", (void *) dynar);
- *cursor = 0;
-}
-
-static XBT_INLINE int
-_xbt_dynar_cursor_get(const xbt_dynar_t dynar,
- unsigned int idx, void *const dst)