Can I start the Worker task in ASMP of presence with arguments?

Asked 2 months ago, Updated 2 months ago, 3 views

I bought it because I was interested in controlling it with multiple CPUs.
Using Presence v1.2.0,
Attempted to run spresense\examples\asmp.
This sample is Supervisor(1cpu): Worker(1cpu), so I would like to make Worker multiple CPUs.
Therefore, I would like to load each CPU of the same Worker task (hello) and process the message with Supervisor.
At this time, each Worker task must have a different message ID.
That's why I was wondering if I could give you an argument when I started the Worker task.
Arguments cannot be passed to the function mptask_exec(&mptask).
Is there any way to make it happen?
Thank you for your cooperation.


2022-09-30 11:03

1 Answers

Although I have never run the same Worker on multiple CPUs, the message ID in the message queue seems to be arbitrarily defined for each message queue as far as the code is concerned.The API specification also says User defined message ID.

I think we create mptask and mpmq objects for each worker, so I think there is no problem using the same value for the message ID.

This is because when I run multiple workers (although it is a separate program), I am not aware of the message ID and can communicate with the same value without any problems.Even if the other party is a common Worker program, it should be running independently for each CPU, so I don't think there will be any change.

2022-09-30 11:03

If you have any answers or tips

© 2022 OneMinuteCode. All rights reserved.