Function rmw_context_fini
Defined in File init.h
Function Documentation
-
rmw_ret_t rmw_context_fini(rmw_context_t *context)
Finalize a context.
This function will return early if a logical error, such as
RMW_RET_INVALID_ARGUMENTorRMW_RET_INCORRECT_RMW_IMPLEMENTATION, ensues, leaving the given context unchanged. Otherwise, it will proceed despite errors, freeing as much resources as it can and zero initializing the given context.
[1] if returns true forAttribute
Adherence
Allocates Memory
Yes
Thread-Safe
No
Uses Atomics
Yes
Lock-Free
Yes [1]
Remark
If context is zero initialized, then
RMW_RET_INVALID_ARGUMENTis returned. If context is initialized and valid (rmw_shutdown()was not called on it), thenRMW_RET_INVALID_ARGUMENTis returned.This should be defined by the rmw implementation.
- Pre:
The context to be finalized must have been previously initialized with
rmw_init(), and then later invalidated withrmw_shutdown().- Returns:
RMW_RET_OKif successful, or- Returns:
RMW_RET_INVALID_ARGUMENTif any arguments are invalid, or- Returns:
RMW_RET_INCORRECT_RMW_IMPLEMENTATIONif the implementation identifier does not match, or- Returns:
RMW_RET_ERRORif an unspecified error occur.