Function llist_copy

Function Documentation

struct llist *llist_copy(struct llist *list, uint32_t flags, void *elements, void *nodes)

Create a copy of a llist.

The flags,elements, and nodes fields of cparams are used to determine how memory should be managed for the new list;

Parameters:
  • list – The linked list handle.

  • flags – Initialization flags for the new list.

  • elements – Space for elements in the new list. Must be non-NULL if RCSW_NOALLOC_DATA is passed in flags; can be NULL otherwise.

  • nodes – Space for nodes in the new list. Must be non-NULL if RCSW_NOALLOC_META is passed in flags; can be NULL otherwise.

Returns:

The new list, or NULL if an error occurred..