This is the mail archive of the pthreads-win32@sources.redhat.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

POSIX Message Queues for Win32!


All,

Since I never actually tested my Win32 port of POSIX Message Queues I had no
idea how close I actually was.  Much to my surprise, I am glad to announce
that the source code provided below is now indeed very functional.  I have
tested this code with the file 'tester.c' using of course the PThreads-Win32
library and it worked great.

I'd like to provide a little history and notes about this source code.

1) I used Richard Steven's (May he RIP) POSIX MQ implementation using UNIX
memory mapped I/O as the base source code.
2) I then had to make a few very minor changes to port it to HP-UX 10.x.
3) I used this code in an in-house UNIX application at work that heavily
tested this code and it never once broke.
4) Thinking I would also need to port this application to Windows NT I
ported the POSIX MQ library to Win32 using Win32 memory mapped I/O.  Since I
never did port my application to Windows NT I never got to test my ported
code.
5) Finally I decided to see just how close I was to having functional code.
In my opinion this code is about 90% functional and can be made available as
is.  See "Things left to be done" below.
6) This code can be used on Win32 as well as UNIX platforms.
7) This code was compiled using MS Visual C++ 6.0.

POSIX Message Queue functions implemented:
mq_open()
mq_close()
mq_unlink()
mq_getattr()
mq_setattr()
mq_receive()
mq_send()

Thing left to be done:
1) Integrate into the current PThread-Win32 library.
2) Implement mq_notify(), this could be tough.  Anyone up for the challenge?
3) Provide more test cases.
4) Build using other compilers?

Finally, given the fact that most of this MQ source code has been heavily
tested by my in-house application on UNIX, I am fairly confident that the
Win32 port should be stable.  But please do test some more.

 <<mqueue.h>>  <<mqueue.c>>  <<tester.c>> 

Aurelio Medina


> -----Original Message-----
> From:	Ross Johnson [SMTP:rpj@ise.canberra.edu.au]
> Sent:	Wednesday, October 11, 2000 6:55 PM
> To:	Medina, Aurelio
> Cc:	jramirez@tct.hut.fi; pthreads-win32@sourceware.cygnus.com
> Subject:	Re: Message queues
> 
> Hi,
> 
> I'm going to make a special note to myself to include Aurelio's
> starting code in the next snapshot, which is what I should have done
> already - sorry. And I'll try to get it out as soon as I can - say,
> by next monday.
> 
> Ross
> 
> aurelio.medina@bankofamerica.com wrote:
> > 
> > Julio,
> > 
> > At one point I sent in my draft code implementing POSIX Message Queues
> for
> > Win32 hoping that someone can complete it.  I may be able to finish it
> in a
> > month or two but my work schedule makes it tough to do.
> > 
> > Has anyone touched the source code that I sent to the PThreads-Win32
> mailing
> > list.  If there is enough interest in POSIX MQs for Win32 I may try to
> > complete it.  I have benefitted from this effort and  I might be able to
> > contribute more if there is enough interest.
> > 
> > Aurelio Medina
> > 
> > > -----Original Message-----
> > > From: Julio [SMTP:jramirez@tct.hut.fi]
> > > Sent: Wednesday, October 11, 2000 5:29 AM
> > > To:   'Pthreads-win32'
> > > Subject:      Message queues
> > >
> > > Sorry, this may be offtopic.
> > >
> > > Could someone tell me where can I find Win32 POSIX libraries for
> message
> > >
> > > queues??
> > >
> > > Thnx.

mqueue.h

mqueue.c

tester.c


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]