aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Olsson <mikael.olsson@arm.com>2024-01-16 10:51:11 +0100
committerMikael Olsson <mikael.olsson@arm.com>2024-01-16 10:51:11 +0100
commit296c4c267b0151e08a6f68d1be58970a384064e4 (patch)
tree0e7fa5082e6b47f795c30a074fea1b3759466de6
parentf5f705310326476ff2aeef979842fe7c3565c039 (diff)
downloadethos-u-core-platform-296c4c267b0151e08a6f68d1be58970a384064e4.tar.gz
Remove designated initializer usage in remoteproc
Designated initializer is not part of the C++ standard until C++20 and requires a compiler extension to work in earlier versions. To ensure the message_handler_openamp can be compiled with compilers without this extension the usage has been removed. Change-Id: I97c90df6691302cc470b8538f515a1b1ceb385b9 Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
-rw-r--r--applications/message_handler_openamp/remoteproc.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/applications/message_handler_openamp/remoteproc.cpp b/applications/message_handler_openamp/remoteproc.cpp
index 8fda69b..ed6f7d0 100644
--- a/applications/message_handler_openamp/remoteproc.cpp
+++ b/applications/message_handler_openamp/remoteproc.cpp
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: Copyright 2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-FileCopyrightText: Copyright 2022-2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
@@ -44,20 +44,11 @@ void setupRProcMem(remoteproc &rproc,
*****************************************************************************/
RProc::RProc(Mailbox::Mailbox &_mailbox, resource_table &table, size_t tableSize) :
- mailbox(_mailbox),
- ops{
- .init = init, // initialize the remoteproc instance
- .remove = remove, // remove the remoteproc instance
- .mmap = nullptr, // memory mapped the memory with physical address as input
- .handle_rsc = handle_rsc, // handle the vendor specific resource
- .config = nullptr, // configure the remoteproc to make it ready to load and run executable
- .start = nullptr, // kick the remoteproc to run application
- .stop = nullptr, // stop the remoteproc from running application, the resource such as memory may not be off.
- .shutdown = nullptr, // shutdown the remoteproc and release its resources.
- .notify = notify, // notify the remote
- .get_mem = nullptr, // get remoteproc memory I/O region.
- },
- vdev(nullptr), mems(), regions(), notifySemaphore(xSemaphoreCreateBinary()) {
+ mailbox(_mailbox), ops({}), vdev(nullptr), mems(), regions(), notifySemaphore(xSemaphoreCreateBinary()) {
+ ops.init = init; // initialize the remoteproc instance
+ ops.remove = remove; // remove the remoteproc instance
+ ops.handle_rsc = handle_rsc; // handle the vendor specific resource
+ ops.notify = notify; // notify the remote
mailbox.registerCallback(mailboxCallback, static_cast<void *>(this));
if (!remoteproc_init(&rproc, &ops, this)) {