AnsweredAssumed Answered

Private Message Queue - Threadsafe?

Question asked by Johannes Traxler on Nov 27, 2013



I have 4 senders and only 1 receiver in my application, so I want to realize some sort of mailslot where I have N senders and 1 receiver.

Is it possible to realize this with only one message queue, that is created (with _msgq_open()) in the receiver and shared as extern variable with the other tasks or do I need one separate message for every task --> 4 + 1 = 5 message queues?


When I refer to chapter " Using Private Message Queues to Receive Messages" of MQX-UG Rev. 3 it says:

"A task can send a message to any private message queue, but only the task that opened a private message

queue can receive messages from it. Only one task at a time can have the private message queue open."


So I guess it should work with only one message queue object. What is your opinion?


BR Johannes