summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 48896c5)
raw | patch | inline | side by side (parent: 48896c5)
author | Wendy Liang <jliang@xilinx.com> | |
Thu, 28 Jul 2016 23:12:28 +0000 (16:12 -0700) | ||
committer | Wendy Liang <jliang@xilinx.com> | |
Thu, 13 Oct 2016 05:01:45 +0000 (22:01 -0700) |
Add cleanup function in the app to do the system cleanup.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Wendy Liang <jliang@xilinx.com>
index 8ee8eb1e03084c6b72ee8bbdd4ba7fbe7cc64250..d7f8b11e0a1187cde7f88beb5373c04b9454e579 100644 (file)
/* External functions */
extern void init_system();
+extern void cleanup_system();
/* Application entry point */
int main()
static void rpmsg_channel_deleted(struct rpmsg_channel *rp_chnl)
{
-
}
static void rpmsg_read_cb(struct rpmsg_channel *rp_chnl, void *data, int len,
{
if ((*(int *)data) == SHUTDOWN_MSG) {
remoteproc_resource_deinit(proc);
+ cleanup_system();
} else {
/* Send data back to master */
rpmsg_send(rp_chnl, data, len);
diff --git a/apps/echo_test/echo_testd_remoteproc_master.c b/apps/echo_test/echo_testd_remoteproc_master.c
index 3eacb86377da8ce5cecaef54c19884b4b94c92e5..4dd893cca42ce4b699874e464db8a68c79f5aaa3 100644 (file)
/* External functions */
extern void init_system();
+extern void cleanup_system();
/* External variables */
extern struct hil_proc proc_table[];
remoteproc_deinit(proc);
+ cleanup_system();
return 0;
}
index 30e30dbe66393c75622cbb553342135f0be2ff0d..f0b2dbe2b21569455ef57cf5a37644c5429757dd 100644 (file)
/* External functions */
extern void init_system();
+extern void cleanup_system();
int main()
{
sleep();
}
+ cleanup_system();
return 0;
}
diff --git a/apps/func_test_suite/func_test_suite_remoteproc_master.c b/apps/func_test_suite/func_test_suite_remoteproc_master.c
index 33eb1b7a5071b81b47646cfb2cf28cb742e8707a..178583e22eb7cbbf77ed28192eef8ac458e0f4aa 100644 (file)
/* External functions */
extern void init_system();
+extern void cleanup_system();
/* External variables */
extern struct hil_proc proc_table[];
test_execute_suite(fw_name1);
+ cleanup_system();
return 0;
}
index cb7662c1c43911ff58cde9525ac0229008672cfb..46a0049398cd8d8fc79725d6f4b9c442b691f352 100644 (file)
/* External functions */
extern void init_system();
+extern void cleanup_system();
/* Application entry point */
int main()
{
if ((*(int *)data) == SHUTDOWN_MSG) {
remoteproc_resource_deinit(proc);
+ cleanup_system();
} else {
memcpy(matrix_array, data, len);
/* Process received data and multiple matrices. */
diff --git a/apps/matrix_multiply/matrix_multiplyd_remoteproc_master.c b/apps/matrix_multiply/matrix_multiplyd_remoteproc_master.c
index 8561f050d3f9c578fddee8868d9572aab4f08e7a..1e550819d3a9854f020f3e05580dca5bb9e5df3d 100644 (file)
/* External functions */
extern void init_system();
+extern void cleanup_system();
/* External variables */
extern struct hil_proc proc_table[];
remoteproc_deinit(proc);
+ cleanup_system();
return 0;
}
index afc44b5631efeae75b47267081a84f3373e1036d..0590ba4be9d9f3445da6f564297d60b3f74e55e1 100755 (executable)
--- a/apps/rpc_demo/rpc_demo.c
+++ b/apps/rpc_demo/rpc_demo.c
/* External functions */
extern void init_system();
+extern void cleanup_system();
#define REDEF_O_CREAT 100
#define REDEF_O_EXCL 200
{
rpmsg_retarget_deinit(rp_chnl);
remoteproc_resource_deinit(proc);
+ cleanup_system();
}