Skip to content

Commit

Permalink
Modified oneliners.
Browse files Browse the repository at this point in the history
Signed-off-by: Javier Santiago <[email protected]>
Signed-off-by: Ricardo González Moreno <[email protected]>
  • Loading branch information
jsan-rt authored and richiware committed Jul 21, 2022
1 parent dc5d78d commit ec7a576
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,26 +123,22 @@ class PubListener : public EventListenerInterface, public eprosima::fastdds::dds
private:
CustomPublisherInfo * publisher_info_ = nullptr;

std::set<eprosima::fastrtps::rtps::GUID_t> subscriptions_
RCPPUTILS_TSA_GUARDED_BY(
discovery_m_);
mutable std::mutex discovery_m_;

std::mutex discovery_m_;
std::set<eprosima::fastrtps::rtps::GUID_t> subscriptions_
RCPPUTILS_TSA_GUARDED_BY(discovery_m_);

bool deadline_changes_;
eprosima::fastdds::dds::OfferedDeadlineMissedStatus offered_deadline_missed_status_
RCPPUTILS_TSA_GUARDED_BY(
on_new_event_m_);
RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_);

bool liveliness_changes_;
eprosima::fastdds::dds::LivelinessLostStatus liveliness_lost_status_
RCPPUTILS_TSA_GUARDED_BY(
on_new_event_m_);
RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_);

bool incompatible_qos_changes_;
eprosima::fastdds::dds::OfferedIncompatibleQosStatus incompatible_qos_status_
RCPPUTILS_TSA_GUARDED_BY(
on_new_event_m_);
RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_);
};

#endif // RMW_FASTRTPS_SHARED_CPP__CUSTOM_PUBLISHER_INFO_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,8 @@ class ServicePubListener : public eprosima::fastdds::dds::DataWriterListener

private:
std::mutex mutex_;
subscriptions_set_t subscriptions_ RCPPUTILS_TSA_GUARDED_BY(
mutex_);
clients_endpoints_map_t clients_endpoints_ RCPPUTILS_TSA_GUARDED_BY(
mutex_);
subscriptions_set_t subscriptions_ RCPPUTILS_TSA_GUARDED_BY(mutex_);
clients_endpoints_map_t clients_endpoints_ RCPPUTILS_TSA_GUARDED_BY(mutex_);
std::condition_variable cv_;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,26 +171,22 @@ class SubListener : public EventListenerInterface, public eprosima::fastdds::dds

bool deadline_changes_;
eprosima::fastdds::dds::RequestedDeadlineMissedStatus requested_deadline_missed_status_
RCPPUTILS_TSA_GUARDED_BY(
on_new_event_m_);
RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_);

bool liveliness_changes_;
eprosima::fastdds::dds::LivelinessChangedStatus liveliness_changed_status_
RCPPUTILS_TSA_GUARDED_BY(
on_new_event_m_);
RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_);

bool sample_lost_changes_;
eprosima::fastdds::dds::SampleLostStatus sample_lost_status_
RCPPUTILS_TSA_GUARDED_BY(
on_new_event_m_);
RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_);

bool incompatible_qos_changes_;
eprosima::fastdds::dds::RequestedIncompatibleQosStatus incompatible_qos_status_
RCPPUTILS_TSA_GUARDED_BY(
discovery_m_);
RCPPUTILS_TSA_GUARDED_BY(discovery_m_);

std::set<eprosima::fastrtps::rtps::GUID_t> publishers_ RCPPUTILS_TSA_GUARDED_BY(
internalMutex_);
discovery_m_);

rmw_event_callback_t on_new_message_cb_{nullptr};

Expand Down
3 changes: 1 addition & 2 deletions rmw_fastrtps_shared_cpp/src/rmw_take.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,7 @@ struct LoanManager
private:
std::mutex mtx;
using ItemVector = eprosima::fastrtps::ResourceLimitedVector<std::unique_ptr<Item>>;
ItemVector items RCPPUTILS_TSA_GUARDED_BY(
mtx);
ItemVector items RCPPUTILS_TSA_GUARDED_BY(mtx);
};

void
Expand Down

0 comments on commit ec7a576

Please sign in to comment.