diff --git a/rcl/include/rcl/publisher.h b/rcl/include/rcl/publisher.h
index fb7aacc..ba5a169 100644
--- a/rcl/include/rcl/publisher.h
+++ b/rcl/include/rcl/publisher.h
@@ -199,7 +199,7 @@ rcl_publisher_get_default_options(void);
/// Borrow a loaned message.
/**
* The memory allocated for the ros message belongs to the middleware and must not be deallocated
- * other than by a call to \sa rcl_return_loaned_message.
+ * other than by a call to \sa rcl_return_loaned_message_from_publisher.
*
*
* Attribute | Adherence
@@ -228,7 +228,7 @@ rcl_borrow_loaned_message(
const rosidl_message_type_support_t * type_support,
void ** ros_message);
-/// Return a loaned message
+/// Return a loaned message previously borrowed from a publisher.
/**
* The ownership of the passed in ros message will be transferred back to the middleware.
* The middleware might deallocate and destroy the message so that the pointer is no longer
@@ -252,7 +252,7 @@ rcl_borrow_loaned_message(
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
-rcl_return_loaned_message(
+rcl_return_loaned_message_from_publisher(
const rcl_publisher_t * publisher,
void * loaned_message);
diff --git a/rcl/include/rcl/subscription.h b/rcl/include/rcl/subscription.h
index 430eea4..b6e85c9 100644
--- a/rcl/include/rcl/subscription.h
+++ b/rcl/include/rcl/subscription.h
@@ -349,10 +349,10 @@ rcl_take_loaned_message(
rmw_message_info_t * message_info,
rmw_subscription_allocation_t * allocation);
-/// Release a loaned message from a topic using a rcl subscription.
+/// Return a loaned message from a topic using a rcl subscription.
/**
* If a loaned message was previously obtained from the middleware with a call to
- * \sa rcl_take_loaned_message, this message has to be released to indicate to the middleware
+ * \sa rcl_take_loaned_message, this message has to be returned to indicate to the middleware
* that the user no longer needs that memory.
* The user must not delete the message.
*
@@ -375,7 +375,7 @@ rcl_take_loaned_message(
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
-rcl_release_loaned_message(
+rcl_return_loaned_message_from_subscription(
const rcl_subscription_t * subscription,
void * loaned_message);
diff --git a/rcl/src/rcl/publisher.c b/rcl/src/rcl/publisher.c
index 930db93..cdd11ca 100644
--- a/rcl/src/rcl/publisher.c
+++ b/rcl/src/rcl/publisher.c
@@ -265,7 +265,7 @@ rcl_borrow_loaned_message(
}
rcl_ret_t
-rcl_return_loaned_message(
+rcl_return_loaned_message_from_publisher(
const rcl_publisher_t * publisher,
void * loaned_message)
{
@@ -273,7 +273,7 @@ rcl_return_loaned_message(
return RCL_RET_PUBLISHER_INVALID; // error already set
}
RCL_CHECK_ARGUMENT_FOR_NULL(loaned_message, RCL_RET_INVALID_ARGUMENT);
- return rmw_return_loaned_message(publisher->impl->rmw_handle, loaned_message);
+ return rmw_return_loaned_message_from_publisher(publisher->impl->rmw_handle, loaned_message);
}
rcl_ret_t
diff --git a/rcl/src/rcl/subscription.c b/rcl/src/rcl/subscription.c
index 5b352ee..8747f54 100644
--- a/rcl/src/rcl/subscription.c
+++ b/rcl/src/rcl/subscription.c
@@ -356,7 +356,7 @@ rcl_take_loaned_message(
}
rcl_ret_t
-rcl_release_loaned_message(
+rcl_return_loaned_message_from_subscription(
const rcl_subscription_t * subscription,
void * loaned_message)
{
@@ -365,7 +365,8 @@ rcl_release_loaned_message(
return RCL_RET_SUBSCRIPTION_INVALID; // error already set
}
RCL_CHECK_ARGUMENT_FOR_NULL(loaned_message, RCL_RET_INVALID_ARGUMENT);
- return rmw_release_loaned_message(subscription->impl->rmw_handle, loaned_message);
+ return rmw_return_loaned_message_from_subscription(
+ subscription->impl->rmw_handle, loaned_message);
}
const char *