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]

Re: POSIX Message Queues for Win32!


I did a quick search for existing Win32 POSIX.4 projects and
could not find any. Therefore, in the absence of a better
place for it, I will keep the code in a separate subtree under
pthreads-win32 and generate a separate DLL. Separation should
not be a problem if a more suitable project is found or started
later on.

One advantage:
Keeping the code with pthreads-win32 may help promote continued
development of both libraries. For example there is still more
that needs to be done within pthread.dll to fully support this
code - such as implement process shared mutexes.

Ross

aurelio.medina@bankofamerica.com wrote:
> 
> John,
> 
> Those are good points and I pretty much agree.  My only recommendation is
> that it stays associated with the PThreads-Win32 library since it is a
> dependency.  If a new project is created who will maintain it?
> 
> Aurelio
> 
> > -----Original Message-----
> > From: Bossom, John [SMTP:John.Bossom@Cognos.COM]
> > Sent: Friday, October 13, 2000 10:08 AM
> > To:   Medina, Aurelio; rpj@ise.canberra.edu.au
> > Cc:   jramirez@tct.hut.fi; pthreads-win32@sourceware.cygnus.com
> > Subject:      RE: POSIX Message Queues for Win32!
> >
> > First of all, I think it is great that you are contributing
> > this MQ code to open source.
> >
> > As I have pointed out to Ross, however, I don't believe that the
> > MQ source should be integrated into the pthreads-win32 library.
> > Instead, I believe it should be it's own library that requires the
> > pthreads-win32.
> >
> > I have two reasons for this:
> >
> > 1) MQs are not part of PThreads. The PThreads-win32 project was
> >    to provide an implementation of POSIX-1003.1c-1995 (i.e. POSIX.4a)
> >    with the addition of semaphores, from POSIX 1003.1b-1993.
> >    MQs are part of POSIX.4
> >    Adding MQ's to pthreads-win32 will basically permut the project
> >    into a repository for all POSIX.4 features; thus it will no
> >    longer be focused on PThreads, specifically.
> >
> > 2) It prevents users from picking and choosing what components
> >    they wish/need. A PThreads client may not want MQ's.
> >    Even on Solaris, the message queues are part of the posix4 library
> >    while the pthreads library is separate.
> >    i.e. to link against both PThreads and MQ's on Solaris, you would
> >         have to specify
> >                   -lposix4 -lpthread
> >
> > My recommendation is to start a new project that provides MQ's
> >
> > John
> >
> > -----Original Message-----
> > From: aurelio.medina@bankofamerica.com
> > [mailto:aurelio.medina@bankofamerica.com]
> > Sent: Friday, October 13, 2000 10:19 AM
> > To: rpj@ise.canberra.edu.au
> > Cc: jramirez@tct.hut.fi; pthreads-win32@sourceware.cygnus.com
> > Subject: 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.

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