Private Message Queue - Threadsafe?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Private Message Queue - Threadsafe?

801件の閲覧回数
johannestraxler
Contributor III

Hello,

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 "3.7.7.6 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

0 件の賞賛
返信
0 返答(返信)