summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ffebfa0)
raw | patch | inline | side by side (parent: ffebfa0)
author | Angela Stegmaier <angelabaker@ti.com> | |
Wed, 29 May 2013 16:55:25 +0000 (11:55 -0500) | ||
committer | Chris Ring <cring@ti.com> | |
Thu, 6 Jun 2013 23:44:12 +0000 (16:44 -0700) |
When calling rpmsg_rpc_destroy, all existing connections
are disconnected so that the remote core may be reloaded
and stale connections are not left open.
When rpmsg_rpc_destroy is called, it is assumed that
the remote processor has already been stopped. In this
case, there is no need to wait for a response from the
disconnect call. Instead, the connection can immediately
be marked as disconnected and destroy can continue.
This patch modifies each remote core connection to have
a parameter that tells whether or not the destroy function
is currently executing. Then, the disconnect call is
updated to check to see if destroy is being executed. If
destroy is being executed, then it does not send the
message to the remote core and wait for a response. Instead,
the connection is simply marked as disconnected.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
are disconnected so that the remote core may be reloaded
and stale connections are not left open.
When rpmsg_rpc_destroy is called, it is assumed that
the remote processor has already been stopped. In this
case, there is no need to wait for a response from the
disconnect call. Instead, the connection can immediately
be marked as disconnected and destroy can continue.
This patch modifies each remote core connection to have
a parameter that tells whether or not the destroy function
is currently executing. Then, the disconnect call is
updated to check to see if destroy is being executed. If
destroy is being executed, then it does not send the
message to the remote core and wait for a response. Instead,
the connection is simply marked as disconnected.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
qnx/src/ipc3x_dev/ti/syslink/rpmsg-rpc/rpmsg-rpc.c | patch | blob | history |
diff --git a/qnx/src/ipc3x_dev/ti/syslink/rpmsg-rpc/rpmsg-rpc.c b/qnx/src/ipc3x_dev/ti/syslink/rpmsg-rpc/rpmsg-rpc.c
index 63baca0425c130c35cf23eeeb9f8c18db516191d..0d4b6b8184167342ecd033c3e5d673a4acdf5b9b 100644 (file)
UInt16 procId;
ProcMgr_Handle procH;
UInt32 numFuncs;
+ Bool destroy;
} rpmsg_rpc_conn_object;
/*!
GT_0trace(curTrace, GT_4CLASS, "Already destroyed.");
status = (EINVAL);
}
- else {
+ else if (!rpc->conn->destroy) {
hdr = (struct rppc_msg_header *)buf;
hdr->msg_type = RPPC_MSG_DESTROY_INSTANCE;
hdr->msg_len = sizeof(struct rppc_instance_handle);
}
}
}
+ else {
+ /* This is the shutdown, remote proc has already been stopped,
+ * so just set created to false. */
+ rpc->created = FALSE;
+ }
return status;
}
WaitingReaders_t * wr = NULL;
struct _msg_info info;
- GT_0trace (curTrace, GT_ENTER, "_rpmsg_rpc_destroy");
+ GT_0trace (curTrace, GT_ENTER, "rpmsg_rpc_destroy");
for (i = 0; i < MAX_CONNS; i++) {
if (rpmsg_rpc_state.objects[i]) {
rpmsg_rpc_conn_object * obj = rpmsg_rpc_state.objects[i];
+ obj->destroy = TRUE;
_deinit_rpmsg_rpc_device(obj->dev);
ProcMgr_close(&obj->procH);
Memory_free(NULL, obj, sizeof(rpmsg_rpc_conn_object));