electroRF
Member
Hi guys,
I always love to hear your suggestions on Designs that I need to prepare and then implement.
And therefore, Thank you in advance
The situation is as follows.
Core A has a SendMessage Function, which transfers a Message to Core B (the SendMessage Function simply calls a Core-2-Core Driver).
Many Tasks in Core A calls this SendMessage Function, with different IDs / Data / Length.
Core B has its own Task for each ID.
The Challenge is as follows.
Gradually, Developers will take a Task from Core B and write it in Core A.
Now the thing is, that if until now, CoreA_Task used the SendMessage Function to transfer a message to CoreB_Task, then it would now need to simply send a Message directly via RTOS to CoreB_Task, since they are in the same Core.
My challenge it to provide a solution so that when CoreA_Task Sends a Message to CoreB_Task, my Mechanism will know whether CoreB_Task was already moved to Core A, or still remained in Core B, and accordingly, will send the Message to Core B, either by RTOS Service (if CoreB_Task is now in Core A ) or by the Core-2-Core Driver (if CoreB_Task still resides in Core B).
How would you design this?
I believe that modifying SendMessage Function is the best solution, instead of changing the code in each Task of Core A. (I'd love to hear your suggestion for how to modify it, if you also believe that's the proper way to design the Mechanism).
I'd love to hear your ideas!
Thank you
I always love to hear your suggestions on Designs that I need to prepare and then implement.
And therefore, Thank you in advance
The situation is as follows.
Core A has a SendMessage Function, which transfers a Message to Core B (the SendMessage Function simply calls a Core-2-Core Driver).
C:
void SendMessage( int MessageID, int* MessageData, int MessageLength)
Many Tasks in Core A calls this SendMessage Function, with different IDs / Data / Length.
Core B has its own Task for each ID.
The Challenge is as follows.
Gradually, Developers will take a Task from Core B and write it in Core A.
Now the thing is, that if until now, CoreA_Task used the SendMessage Function to transfer a message to CoreB_Task, then it would now need to simply send a Message directly via RTOS to CoreB_Task, since they are in the same Core.
My challenge it to provide a solution so that when CoreA_Task Sends a Message to CoreB_Task, my Mechanism will know whether CoreB_Task was already moved to Core A, or still remained in Core B, and accordingly, will send the Message to Core B, either by RTOS Service (if CoreB_Task is now in Core A ) or by the Core-2-Core Driver (if CoreB_Task still resides in Core B).
How would you design this?
I believe that modifying SendMessage Function is the best solution, instead of changing the code in each Task of Core A. (I'd love to hear your suggestion for how to modify it, if you also believe that's the proper way to design the Mechanism).
I'd love to hear your ideas!
Thank you
Last edited: