diff options
author | Suman Anna <s-anna@ti.com> | 2017-01-17 15:33:33 -0600 |
---|---|---|
committer | Angela Stegmaier <angelabaker@ti.com> | 2017-01-19 11:19:43 -0600 |
commit | 2b815640861465842b41e7f92f51d6a54436a1e0 (patch) | |
tree | 66bb3266d2c30bc7943ac625cb7b56c9638387e8 | |
parent | 16e5bff46674d62d55f874e0e107599fd1938c26 (diff) | |
download | ipc-2b815640861465842b41e7f92f51d6a54436a1e0.tar.gz |
Tests: ping_tasks: Use different description names for each channel
The RPMSG_NS_2.0 feature was introduced to distinguish multiple channels of
the same service type to the host OS. The ping_tasks example however has been
using the same descriptor name for both the services. Use unique names for
each channel so that it conforms to the NS_2.0 design. Also, fixed some minor
incorrect whitespace indentation issues.
Issue found with the recent changes on upstream Linux 4.9 kernel.
Signed-off-by: Suman Anna <s-anna@ti.com>
-rw-r--r-- | packages/ti/ipc/tests/ping_tasks.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/packages/ti/ipc/tests/ping_tasks.c b/packages/ti/ipc/tests/ping_tasks.c index c84ac96..4f4026a 100644 --- a/packages/ti/ipc/tests/ping_tasks.c +++ b/packages/ti/ipc/tests/ping_tasks.c @@ -55,22 +55,25 @@ Void copyTaskFxn(UArg arg0, UArg arg1) { RPMessage_Handle handle; - Char buffer[128]; - UInt32 myEndpoint = 0; - UInt32 remoteEndpoint; - UInt16 dstProc; - UInt16 len; - Int i; + Char buffer[128]; + Char desc[32]; + UInt32 myEndpoint = 0; + UInt32 remoteEndpoint; + UInt16 dstProc; + UInt16 len; + Int i; - System_printf("copyTask %d: Entered...:\n", arg0); + System_printf("copyTask sample%d:%d: Entered...:\n", arg1, arg0); dstProc = MultiProc_getId("HOST"); /* Create the messageQ for receiving (and get our endpoint for sending). */ handle = RPMessage_create(arg0, NULL, NULL, &myEndpoint); + System_sprintf(desc, "sample%d", arg1); + #ifdef RPMSG_NS_2_0 - NameMap_register("rpmsg-client-sample", "sample-desc", arg0); + NameMap_register("rpmsg-client-sample", desc, arg0); #else NameMap_register("rpmsg-client-sample", arg0); #endif @@ -101,11 +104,13 @@ void start_ping_tasks() params.instance->name = "copy0"; params.priority = 3; params.arg0 = 50; + params.arg1 = 1; Task_create(copyTaskFxn, ¶ms, NULL); Task_Params_init(¶ms); params.instance->name = "copy1"; params.priority = 3; params.arg0 = 51; + params.arg1 = 2; Task_create(copyTaskFxn, ¶ms, NULL); } |