This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problems with Message Priority



Hi,

I have a problem with the message priority and have no idea how to solve it, any help will be greatly appreciated.

 

Here is the description of the system:

Processor: c6472 

BIOS: 6.31.4.27    

IPC : 1.22.3.23

XDC: 3.20.8.88

XDAIS : 6.23

CCS : 4.2.4.00033

SW structure: Three Tasks (TaskA, TaskB, TaskC) with TaskA being the highest higher priority following by TaskB then TaskC

core0: TaskA and TaskB

core1: TaskC

Each of the Task have a MessageQ associated with it (MessageQ_create() was used at the creation of the task)

All the messages sent between the Tasks are the same priority.

No Error reported during MessageQ_create

All the tasks are pending on the MessageQ_get(xxx,xxx, , MessageQ_FOREVER) with no timeout period.

 

PROBLEM:

  1. TaskC send a message to wake up TaskB
  2. TaskB received the message and process the logic needed to handle TaskC’s message
  3. While TaskB is processing the logic for TaskC’s message, TaskA send a message to TaskB
  4. TaskB received the message and process the logic needed to handle TaskA’s message.
  5. TaskB finished processing the logic needed for TaskA’s message.
  6. TaskB finished processing the logic needed for TaskC’s message.

 

The tasks are reentrant but the priorities of all the messages are the same, so shouldn’t TaskB finish servicing the logic it needed for TaskC’s message first before servicing TaskA’s message.

 

Thanks much,

Dominic

 

 

  • Dominic,

    In your scenario above, I think it should be the case that TaskB should finish processing TaskC's message before processing TaskA's.

    Are you sure that TaskA's message was not sent before TaskC's and how do you know this for sure?

    In step#3, How does TaskA send a message to TaskB while TaskB is processing TaskC's message?  Only 1 Task can be executing at any given point, Since TaskA is higher priority, if its ready to run then it should be running and TaskB should not be running at that point.

    My only other suggestion is for you to try using ROV to see if you can see what message if any are in the message queue before TaskA sends a message to TaskB.

    Judah