Function rcl_trigger_guard_condition

Function Documentation

rcl_ret_t rcl_trigger_guard_condition(rcl_guard_condition_t *guard_condition)

Trigger a rcl guard condition.

This function can fail, and return RCL_RET_INVALID_ARGUMENT, if the:

  • guard condition is NULL

  • guard condition is invalid (never called init or called fini)

A guard condition can be triggered from any thread.

Attribute

Adherence

Allocates Memory

Yes

Thread-Safe

No [1]

Uses Atomics

No

Lock-Free

Yes

[1] it can be called concurrently with itself, even on the same guard condition

Parameters:

guard_condition[in] handle to the guard_condition to be triggered

Returns:

RCL_RET_OK if the guard condition was triggered, or

Returns:

RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or

Returns:

RCL_RET_ERROR if an unspecified error occurs.