Function rcl_context_fini
Defined in File context.h
Function Documentation
-
rcl_ret_t rcl_context_fini(rcl_context_t *context)
Finalize a context.
The context to be finalized must have been previously initialized with rcl_init(), and then later invalidated with rcl_shutdown(). A zero-initialized context that has not been initialized can be finalized. If context is
NULL
, then RCL_RET_INVALID_ARGUMENT is returned. If context is zero-initialized, then RCL_RET_OK is returned. If context is initialized and valid (rcl_shutdown() was not called on it), then RCL_RET_INVALID_ARGUMENT is returned.Attribute
Adherence
Allocates Memory
Yes
Thread-Safe
No
Uses Atomics
Yes
Lock-Free
Yes [1]
- Parameters:
context – [inout] object to be finalized.
- Returns:
RCL_RET_OK if the shutdown was completed successfully, or
- Returns:
RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or
- Returns:
RCL_RET_ERROR if an unspecified error occur.