Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions score/message_passing/unix_domain/unix_domain_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void UnixDomainServer::ServerConnection::RequestDisconnect() noexcept
server_.engine_->UnregisterPosixEndpoint(endpoint_);
}

bool UnixDomainServer::ServerConnection::ProcessInput() noexcept
bool UnixDomainServer::ServerConnection::ProcessInput()
{
std::uint8_t code;
auto& user_data = *user_data_;
Expand Down Expand Up @@ -134,7 +134,7 @@ bool UnixDomainServer::ServerConnection::ProcessInput() noexcept
return true;
}

UnixDomainServer::ServerConnection::~ServerConnection() noexcept
UnixDomainServer::ServerConnection::~ServerConnection() noexcept(false)
{
if (user_data_.has_value())
{
Expand Down
4 changes: 2 additions & 2 deletions score/message_passing/unix_domain/unix_domain_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ class UnixDomainServer final : public IServer

// Server methods
void AcceptConnection(UserData&& data, score::cpp::pmr::unique_ptr<ServerConnection>&& self) noexcept;
bool ProcessInput() noexcept;
bool ProcessInput();

~ServerConnection() noexcept;
~ServerConnection() noexcept(false);

private:
UnixDomainServer& server_;
Expand Down
12 changes: 6 additions & 6 deletions score/mw/com/api_surface.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"name": "Create",
"qualified_name": "score::mw::com::InstanceIdentifier::Create",
"kind": "method",
"signature": "static Create : score::Result<InstanceIdentifier> (std::string &&) noexcept"
"signature": "static Create : score::Result<InstanceIdentifier> (std::string &&)"
},
{
"name": "InstanceIdentifier",
Expand Down Expand Up @@ -227,7 +227,7 @@
"name": "Create",
"qualified_name": "score::mw::com::GenericProxy::Create",
"kind": "method",
"signature": "static Create : Result<GenericProxy> (HandleType) noexcept"
"signature": "static Create : Result<GenericProxy> (HandleType)"
},
{
"name": "FindService",
Expand Down Expand Up @@ -311,7 +311,7 @@
"name": "Subscribe",
"qualified_name": "score::mw::com::GenericProxyEvent::Subscribe",
"kind": "method",
"signature": "Subscribe : Result<void> (const std::size_t) noexcept"
"signature": "Subscribe : Result<void> (const std::size_t)"
},
{
"name": "UnsetReceiveHandler",
Expand Down Expand Up @@ -799,7 +799,7 @@
"name": "ProxyEventBase",
"qualified_name": "score::mw::com::GenericProxyEvent::ProxyEventBase",
"kind": "constructor",
"signature": "ProxyEventBase : void (std::string_view, Result<std::unique_ptr<ProxyEventBindingBase>>) noexcept"
"signature": "ProxyEventBase : void (std::string_view, Result<std::unique_ptr<ProxyEventBindingBase>>)"
},
{
"name": "ProxyEventBase",
Expand Down Expand Up @@ -841,13 +841,13 @@
"name": "Create",
"qualified_name": "score::mw::com::GenericSkeleton::Create",
"kind": "method",
"signature": "static Create : Result<GenericSkeleton> (const InstanceIdentifier &, const GenericSkeletonServiceElementInfo &) noexcept [[nodiscard]]"
"signature": "static Create : Result<GenericSkeleton> (const InstanceIdentifier &, const GenericSkeletonServiceElementInfo &) [[nodiscard]]"
},
{
"name": "Create",
"qualified_name": "score::mw::com::GenericSkeleton::Create",
"kind": "method",
"signature": "static Create : Result<GenericSkeleton> (const InstanceSpecifier &, const GenericSkeletonServiceElementInfo &) noexcept [[nodiscard]]"
"signature": "static Create : Result<GenericSkeleton> (const InstanceSpecifier &, const GenericSkeletonServiceElementInfo &) [[nodiscard]]"
},
{
"name": "GetEvents",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ constexpr auto MAX_REFERENCE_RETRIES = 100U;

template <template <class> class AtomicIndirectorType>
ConsumerEventDataControlLocalView<AtomicIndirectorType>::ConsumerEventDataControlLocalView(
EventDataControl& event_data_control_shared) noexcept
EventDataControl& event_data_control_shared)
: state_slots_{event_data_control_shared.state_slots_.begin(), event_data_control_shared.state_slots_.size()}
{
}

template <template <class> class AtomicIndirectorType>
ConsumerEventDataControlLocalView<AtomicIndirectorType>::ConsumerEventDataControlLocalView(
EventDataControl& event_data_control_shared,
TransactionLogLocalView transaction_log_local_view) noexcept
TransactionLogLocalView transaction_log_local_view)
: ConsumerEventDataControlLocalView{event_data_control_shared}
{
SetTransactionLogLocalView(transaction_log_local_view);
Expand All @@ -55,7 +55,7 @@ template <template <class> class AtomicIndirectorType>
// coverity[autosar_cpp14_a15_5_3_violation : FALSE]
auto ConsumerEventDataControlLocalView<AtomicIndirectorType>::ReferenceNextEvent(
const EventSlotStatus::EventTimeStamp last_search_time,
const EventSlotStatus::EventTimeStamp upper_limit) noexcept -> std::optional<SlotIndexType>
const EventSlotStatus::EventTimeStamp upper_limit) -> std::optional<SlotIndexType>
{
// function can only finish with result, if use count was able to be increased
std::optional<SlotIndexType> possible_index{};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ConsumerEventDataControlLocalView final
public:
using LocalEventControlSlots = score::cpp::span<ControlSlotType>;

ConsumerEventDataControlLocalView(EventDataControl& event_data_control_shared) noexcept;
ConsumerEventDataControlLocalView(EventDataControl& event_data_control_shared);

/// Test-only constructor which allows to directly set the TransactionLogLocalView. This avoids having to
/// inject the TransactionLogLocalView via the production code path which would require creating a
Expand All @@ -63,7 +63,7 @@ class ConsumerEventDataControlLocalView final
/// In production, this cannot be used since the ConsumerEventDataControlLocalView is created before the
/// TransactionLog is created, so it must be injected later.
ConsumerEventDataControlLocalView(EventDataControl& event_data_control_shared,
TransactionLogLocalView transaction_log_local_view) noexcept;
TransactionLogLocalView transaction_log_local_view);

~ConsumerEventDataControlLocalView() noexcept = default;

Expand All @@ -85,7 +85,7 @@ class ConsumerEventDataControlLocalView final
/// \post DereferenceEvent() is invoked to withdraw read-ownership
std::optional<SlotIndexType> ReferenceNextEvent(
const EventSlotStatus::EventTimeStamp last_search_time,
const EventSlotStatus::EventTimeStamp upper_limit = EventSlotStatus::TIMESTAMP_MAX) noexcept;
const EventSlotStatus::EventTimeStamp upper_limit = EventSlotStatus::TIMESTAMP_MAX);

/// \brief Increments refcount of given slot by one (given it is in the correct state i.e. being accessible/
/// readable)
Expand Down
2 changes: 1 addition & 1 deletion score/mw/com/impl/bindings/lola/event_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace score::mw::com::impl::lola
EventControl::EventControl(const SlotIndexType number_of_slots,
const SubscriberCountType max_subscribers,
const bool enforce_max_samples,
score::memory::shared::ManagedMemoryResource& resource) noexcept
score::memory::shared::ManagedMemoryResource& resource)
: data_control{number_of_slots, resource},
subscription_control{number_of_slots, max_subscribers, enforce_max_samples},
transaction_log_set_{max_subscribers, number_of_slots, resource}
Expand Down
2 changes: 1 addition & 1 deletion score/mw/com/impl/bindings/lola/event_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class EventControl
EventControl(const SlotIndexType number_of_slots,
const SubscriberCountType max_subscribers,
const bool enforce_max_samples,
score::memory::shared::ManagedMemoryResource& resource) noexcept;
score::memory::shared::ManagedMemoryResource& resource);

// Suppress "AUTOSAR C++14 M11-0-1" rule findings. This rule states: "Member data in non-POD class types shall
// be private.". There are no class invariants to maintain which could be violated by directly accessing member
Expand Down
2 changes: 1 addition & 1 deletion score/mw/com/impl/bindings/lola/event_data_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class EventDataControl
using EventControlSlots =
containers::DynamicArray<ControlSlotType, memory::shared::PolymorphicOffsetPtrAllocator<ControlSlotType>>;

EventDataControl(const SlotIndexType max_slots, score::memory::shared::ManagedMemoryResource& resource) noexcept
EventDataControl(const SlotIndexType max_slots, score::memory::shared::ManagedMemoryResource& resource)
: state_slots_{max_slots, resource}
{
}
Expand Down
2 changes: 1 addition & 1 deletion score/mw/com/impl/bindings/lola/generic_proxy_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Result<std::size_t> GenericProxyEvent::GetNumNewSamplesAvailableImpl() const noe
// implicitly". std::terminate() is implicitly called from '.value()' in case it doesn't have a value but as we check
// before with 'has_value()' so no way for throwing std::bad_optional_access which leds to std::terminate().
// coverity[autosar_cpp14_a15_5_3_violation : FALSE]
Result<std::size_t> GenericProxyEvent::GetNewSamplesImpl(Callback&& receiver, TrackerGuardFactory& tracker) noexcept
Result<std::size_t> GenericProxyEvent::GetNewSamplesImpl(Callback&& receiver, TrackerGuardFactory& tracker)
{
const auto max_sample_count = tracker.GetNumAvailableGuards();

Expand Down
2 changes: 1 addition & 1 deletion score/mw/com/impl/bindings/lola/generic_proxy_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class GenericProxyEvent final : public GenericProxyEventBinding
void NotifyServiceInstanceChangedAvailability(bool is_available, pid_t new_event_source_pid) noexcept override;

private:
Result<std::size_t> GetNewSamplesImpl(Callback&& receiver, TrackerGuardFactory& tracker) noexcept;
Result<std::size_t> GetNewSamplesImpl(Callback&& receiver, TrackerGuardFactory& tracker);
Result<std::size_t> GetNumNewSamplesAvailableImpl() const noexcept;

ProxyEventCommon proxy_event_common_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ MessagePassingService::MessagePassingService(
const AsilSpecificCfg& config_asil_qm,
const std::optional<AsilSpecificCfg>& config_asil_b,
// coverity[autosar_cpp14_a8_4_12_violation] Function only uses the object without affecting ownership
const std::unique_ptr<IMessagePassingServiceInstanceFactory>& factory) noexcept
const std::unique_ptr<IMessagePassingServiceInstanceFactory>& factory)
: IMessagePassingService{},
client_factory_{score::cpp::pmr::make_shared<Engine>(score::cpp::pmr::get_default_resource(),
score::cpp::pmr::get_default_resource(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class MessagePassingService final : public IMessagePassingService
/// \param factory optional factory used to create MessagePassingServiceInstances
MessagePassingService(const AsilSpecificCfg& config_asil_qm,
const std::optional<AsilSpecificCfg>& config_asil_b,
const std::unique_ptr<IMessagePassingServiceInstanceFactory>& factory) noexcept;
const std::unique_ptr<IMessagePassingServiceInstanceFactory>& factory);

MessagePassingService(const MessagePassingService&) = delete;
MessagePassingService(MessagePassingService&&) = delete;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,9 @@ MessagePassingServiceInstance::MessagePassingServiceInstance(
// Suppress autosar_cpp14_a15_5_3_violation: False Positive
// Rationale: Passing an argument by reference cannot throw
// coverity[autosar_cpp14_a15_5_3_violation : FALSE]
auto received_send_message_callback =
[scoped_function = message_callback_scoped_function](
score::message_passing::IServerConnection& connection,
const score::cpp::span<const std::uint8_t> message) noexcept -> score::cpp::blank {
auto received_send_message_callback = [scoped_function = message_callback_scoped_function](
score::message_passing::IServerConnection& connection,
const score::cpp::span<const std::uint8_t> message) -> score::cpp::blank {
SCORE_LANGUAGE_FUTURECPP_ASSERT_PRD_MESSAGE(std::holds_alternative<std::uintptr_t>(connection.GetUserData()),
"Message Passing: UserData does not contain a uintptr_t");
// Suppress "AUTOSAR C++14 A15-5-3" The rule states: "Implicit call of std::terminate()"
Expand Down Expand Up @@ -296,15 +295,13 @@ MessagePassingServiceInstance::MessagePassingServiceInstance(

message_passing::MessageCallback MessagePassingServiceInstance::CreateSendMessageWithReplyCallback()
{
auto message_callback_with_reply_scoped_function =
std::make_shared<score::safecpp::MoveOnlyScopedFunction<score::Result<void>(
uid_t, pid_t, score::cpp::span<const std::uint8_t>)>>(
message_callback_scope_,
[this](uid_t sender_uid,
pid_t sender_pid,
score::cpp::span<const std::uint8_t> message) noexcept -> score::Result<void> {
return this->MessageCallbackWithReply(sender_uid, sender_pid, message);
});
auto message_callback_with_reply_scoped_function = std::make_shared<score::safecpp::MoveOnlyScopedFunction<
score::Result<void>(uid_t, pid_t, score::cpp::span<const std::uint8_t>)>>(
message_callback_scope_,
[this](
uid_t sender_uid, pid_t sender_pid, score::cpp::span<const std::uint8_t> message) -> score::Result<void> {
return this->MessageCallbackWithReply(sender_uid, sender_pid, message);
});

// Note. When received_send_message_with_reply_callback returns an error, the message passing connection with the
// client will be disconnected. Therefore, we only return an error from the callback when the error is unrecoverable
Expand All @@ -313,7 +310,7 @@ message_passing::MessageCallback MessagePassingServiceInstance::CreateSendMessag
auto received_send_message_with_reply_callback =
[message_callback_with_reply_scoped_function = std::move(message_callback_with_reply_scoped_function)](
score::message_passing::IServerConnection& connection,
score::cpp::span<const std::uint8_t> message) noexcept -> score::cpp::expected_blank<score::os::Error> {
score::cpp::span<const std::uint8_t> message) -> score::cpp::expected_blank<score::os::Error> {
const auto client_identity = connection.GetClientIdentity();
const pid_t client_pid = client_identity.pid;
const auto client_uid = client_identity.uid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ TypeErasedCallQueue::TypeErasedCallQueue(memory::shared::ManagedMemoryResource&
std::tie(in_args_queue_start_address_, return_queue_start_address_) = AllocateQueue();
}

TypeErasedCallQueue::~TypeErasedCallQueue()
TypeErasedCallQueue::~TypeErasedCallQueue() noexcept(false)
{
if (in_args_queue_start_address_.data != nullptr)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class TypeErasedCallQueue final
TypeErasedCallQueue(memory::shared::ManagedMemoryResource& resource,
const TypeErasedElementInfo& type_erased_element_info);

~TypeErasedCallQueue();
~TypeErasedCallQueue() noexcept(false);

TypeErasedCallQueue(const TypeErasedCallQueue&) = delete;
TypeErasedCallQueue& operator=(const TypeErasedCallQueue&) = delete;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ constexpr auto MAX_ALLOCATE_RETRIES = 100U;

template <template <class> class AtomicIndirectorType>
ProviderEventDataControlLocalView<AtomicIndirectorType>::ProviderEventDataControlLocalView(
EventDataControl& event_data_control) noexcept
EventDataControl& event_data_control)
: state_slots_{event_data_control.state_slots_.begin(), event_data_control.state_slots_.size()}
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ProviderEventDataControlLocalView final

using LocalEventControlSlots = score::cpp::span<ControlSlotType>;

ProviderEventDataControlLocalView(EventDataControl& event_data_control) noexcept;
ProviderEventDataControlLocalView(EventDataControl& event_data_control);

~ProviderEventDataControlLocalView() noexcept = default;

Expand Down
Loading
Loading