From 9c3af41b1adbeae19d75e5c418122005145cfa7c Mon Sep 17 00:00:00 2001 From: Shoji Morita Date: Fri, 26 Jan 2024 18:52:10 +0900 Subject: [PATCH] Modified structure member names to reflect the point made on the thread below. https://github.com/ros-infrastructure/rep/pull/385#discussion_r1350512216 Signed-off-by: Shoji Morita --- rclcpp/src/rclcpp/executors/multi_threaded_executor.cpp | 2 +- rclcpp/src/rclcpp/executors/single_threaded_executor.cpp | 2 +- rclcpp/test/rclcpp/executors/test_multi_threaded_executor.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rclcpp/src/rclcpp/executors/multi_threaded_executor.cpp b/rclcpp/src/rclcpp/executors/multi_threaded_executor.cpp index 8e61746f93..83adfb6a12 100644 --- a/rclcpp/src/rclcpp/executors/multi_threaded_executor.cpp +++ b/rclcpp/src/rclcpp/executors/multi_threaded_executor.cpp @@ -174,7 +174,7 @@ default_thread_attr(rclcpp::ExecutorOptions const & options) const rcutils_thread_attr_t * attr = std::find_if( attrs_beg, attrs_end, [&](const auto & attr) { - return attr.name == name; + return attr.tag == name; }); if (attr != attrs_end) { return rcpputils::ThreadAttribute(*attr); diff --git a/rclcpp/src/rclcpp/executors/single_threaded_executor.cpp b/rclcpp/src/rclcpp/executors/single_threaded_executor.cpp index 8d3212efc9..1a3157c58d 100644 --- a/rclcpp/src/rclcpp/executors/single_threaded_executor.cpp +++ b/rclcpp/src/rclcpp/executors/single_threaded_executor.cpp @@ -88,7 +88,7 @@ default_thread_attr(rclcpp::ExecutorOptions const & options) const rcutils_thread_attr_t * attr = std::find_if( attrs_beg, attrs_end, [&](const auto & attr) { - return attr.name == name; + return attr.tag == name; }); if (attr != attrs_end) { return rcpputils::ThreadAttribute(*attr); diff --git a/rclcpp/test/rclcpp/executors/test_multi_threaded_executor.cpp b/rclcpp/test/rclcpp/executors/test_multi_threaded_executor.cpp index 8b552a4c04..06f8347c4f 100644 --- a/rclcpp/test/rclcpp/executors/test_multi_threaded_executor.cpp +++ b/rclcpp/test/rclcpp/executors/test_multi_threaded_executor.cpp @@ -160,11 +160,11 @@ constexpr char const * argv[] = { "--ros-args", "--thread-attrs-value", R"( -- name: RCLCPP_EXECUTOR_MULTI_THREADED +- tag: RCLCPP_EXECUTOR_MULTI_THREADED scheduling_policy: FIFO priority: 10 core_affinity: [] -- name: executor-1 +- tag: executor-1 scheduling_policy: RR priority: 20 core_affinity: [0]