Posix Message Queue on SMP System

Hi All!

I am running into a stange behavior on a Dual CPU SBC board. I have two
process running with each of them having their own Posix queue. Each
process will read their queue without problems, but sometimes they will
simply stop reading it. I can go in the /dev/mqueue diretory and I can see
that the two queues have something in their queues. This behavior is only
hapenning on a SMP board. When I go back to a single SBC board the problem
does not occured, that using the same code for both process.

Q: Does QNX have internal memory protection to prevent two process to write
to the POSIX queue at the same time?

Cheers and Thanks!

Stephane Grenier

Istar <sgrenier@ca.inter.net> wrote:

Q: Does QNX have internal memory protection to prevent two process to
write to the POSIX queue at the same time?

The message queues are maintained by the “mqueue” server process, which
is just single-threaded, and so serialises user access to the queues
(regardless of SMP or not or multiple users or not). So I doubt there
is any race condition there. How do you access the queues, just with
mq_receive() or do you use mq_notify() (meaning you could have a race
condition in your applications)? What states does “pidin” report the
relevant processes to be in?