diff options
authorAngela Stegmaier2016-12-09 16:14:09 -0600
committerAngela Stegmaier2017-01-17 14:46:27 -0600
commit5fd7da53b505e1bc80a0c9d116fe31e5cd177d74 (patch)
tree53fc0f5585beb0ad879797e59889ba3f31a8bbab /memplugin_android.c
parentc51f144b079836afb868bff44afe7308248a0217 (diff)
libdce[Android]: Add dce_ipc_recover API
In case of remote core recovery due to remote core crash, the rpmsg-dce handle needs to be closed and re-opened since any handles that were open when the crash happened are marked as stale in the driver. This patch adds a new API that the user can call to close the rpmsg-dce handle so that recovery can happen. In case the user receives notification of a remote core crash, it can call the dce_ipc_recover() API to make sure that the rpmsg-dce handle that is opened during dce_buf_lock is closed so that a new one can be opened the next time. Change-Id: I8ebc19e308ffe7431b57c31cfecd469e171777f6 Signed-off-by: Angela Stegmaier <>
Diffstat (limited to 'memplugin_android.c')
1 files changed, 4 insertions, 2 deletions
diff --git a/memplugin_android.c b/memplugin_android.c
index 22a5564..b140aa5 100644
--- a/memplugin_android.c
+++ b/memplugin_android.c
@@ -99,8 +99,10 @@ int memplugin_close()
99 /*Acquire permission to use IPC*/ 99 /*Acquire permission to use IPC*/
100 pthread_mutex_lock(&ipc_mutex); 100 pthread_mutex_lock(&ipc_mutex);
101 101
102 dce_ipc_deinit(IPU, -1); 102 if (is_ipc_ready) {
103 is_ipc_ready = 0; 103 dce_ipc_deinit(IPU, -1);
104 is_ipc_ready = 0;
105 }
104 106
105 /*Relinquish IPC*/ 107 /*Relinquish IPC*/
106 pthread_mutex_unlock(&ipc_mutex); 108 pthread_mutex_unlock(&ipc_mutex);