Is POSIX message queue implimentation correct?

Joel Sherrill joel.sherrill at OARcorp.com
Fri May 11 12:38:40 UTC 2001


Phil Torre wrote:
> 
> On Thu, May 10, 2001 at 02:59:36PM -0500, Joel Sherrill wrote:
> >
> > Without some serious re-reading, I don't want to comment.  Your
> > interpretation is certainly reasonable and the one-process nature
> > of RTEMS could make it a valid but not as useful as possible
> > implementation.  If each open gets some secondary structure, then
> > it would be possible to do this.  Offhand, I don't know how much work
> > would be required to change this.
> 
> Thanks for that link, Joel.  The Unix98 spec has some sort of confusing
> statements about queues being able to be opened multiple times in the
> same or different processes, doesn't explicitly state what the scope
> of the blocking attribute is (that I can see).  I did dig up some
> documentation on the 1003.1b implementation for Digital UNIX (AKA OSF-1)
> which states clearly that blocking is an attribute of the descriptor,
> and that all threads within a process share the same descriptor.
> So, RTEMS is doing it right by pretending to be one big process.
> 
> I don't know how much work it would be to make the descriptors be per-
> thread objects, but beyond that I'm not sure it's the right thing to
> do (in that the current behavior is correct given the RTEMS process
> model).

If the RTEMS community can come to general agreement over the
interpretation
of this specification or check the behavior for multiple opens within
a single process on Linux or Solaris, then we can check into changing
this.

I think that if mqd_t is modified to be a two element structure with 
the oflags and the ID of the underlying queue, it is a fairly simple 
(although probably tedious) change to make.

> --
> 
> =====================================================================
> Phil Torre                               phone: 425-820-6363 x234
> Design Engineer                          email: ptorre at zetron.com
> Switching Systems Group                    fax: 425-820-7031
> Zetron, Inc.                               web: http://www.zetron.com

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



More information about the users mailing list