* mq_timedreceive on multiple queues
@ 2013-04-15 7:48 Romain Geissler
0 siblings, 0 replies; only message in thread
From: Romain Geissler @ 2013-04-15 7:48 UTC (permalink / raw)
To: linux-c-programming
Hi,
I am currently facing an issue when reading in a set of several posix
queues (let's say 2 different mqueues) from several processes. I
currently use epoll_wait to wait for an incoming message on either
queue on all listening processes, then mq_timedreceive to retrieve it
from the queue.
This is an issue when the number of reader process grows, as if I send
only one message on a queue, all processes are awaken when epoll_wait
returns, and all processes try to fetch the message. I would like to
fix this and wake up only one process when listening to several
queues, removing the useless user/kernel space switchs for the other
listening processes.
Is there any way to run a mq_receive/mq_timedreceive on several
queues, that would wake up only one process? Something more or less
like epoll, but that also fetches a message from the readable queues
before returning.
Thanks,
Romain
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-04-15 7:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-15 7:48 mq_timedreceive on multiple queues Romain Geissler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).