Function rcl_wait_set_clear

Function Documentation

rcl_ret_t rcl_wait_set_clear(rcl_wait_set_t *wait_set)

Remove (sets to NULL) all entities in the wait set.

This function should be used after passing using rcl_wait, but before adding new entities to the set. Sets all of the entries in the underlying rmw array to NULL, and sets the count in the rmw array to 0.

Calling this on an uninitialized (zero initialized) wait set will fail.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:

wait_set[inout] struct to have its entities cleared

Returns:

RCL_RET_OK if cleared successfully, or

Returns:

RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or

Returns:

RCL_RET_WAIT_SET_INVALID if the wait set is zero initialized, or

Returns:

RCL_RET_ERROR if an unspecified error occurs.