Function rcl_wait_set_fini

Function Documentation

rcl_ret_t rcl_wait_set_fini(rcl_wait_set_t *wait_set)

Finalize a rcl wait set.

Deallocates any memory in the wait set that was allocated in rcl_wait_set_init() using the allocator given in the initialization.

Calling this function on a zero initialized wait set will do nothing and return RCL_RET_OK. Calling this function on uninitialized memory results in undefined behavior. After calling this function the wait set will once again be zero initialized and so calling this function or rcl_wait_set_init() immediately after will succeed.

Attribute

Adherence

Allocates Memory

Yes

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:

wait_set[inout] the wait set struct to be finalized.

Returns:

RCL_RET_OK if the finalization was successful, or

Returns:

RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or

Returns:

RCL_RET_WAIT_SET_INVALID if the wait set is not destroyed properly, or

Returns:

RCL_RET_ERROR if an unspecified error occurs.