Function rcutils_array_list_add

Function Documentation

rcutils_ret_t rcutils_array_list_add(rcutils_array_list_t *array_list, const void *data)

Adds an entry to the list.

This function adds the provided data to the end of the list. A shallow copy of the provided data is made to store in the list instead of just storing the pointer to the provided data.

Attribute

Adherence

Allocates Memory

Yes

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:
  • array_list[in] to add the data to

  • data[in] a pointer to the data to add to the list

Returns:

RCUTILS_RET_OK if successful, or

Returns:

RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or

Returns:

RCUTILS_RET_BAD_ALLOC if memory allocation fails, or

Returns:

RCUTILS_RET_ERROR if an unknown error occurs.