Message queues

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi all,

We have a process in embedded linux which posts messages on a message
queue. At a later processing stage, the process requires to flush these
messages.

What is the recommended way of flushing the queue other than reading
the posted messages in a loop? Our design requires to have waited calls
on message queues. Reading the messages in a loop will eventually block
the process on the last msgrcv call.

Please suggest a better way to achieve this on embedded linux.

Thanks
rtos


Re: Message queues
Quoted text here. Click to load it

You could additionally wait on another resource or use a signal to
prevent blocking.

Perhaps you can delete the queue and recreate it to unload the messages.

-Michael

Site Timeline