This is the mail archive of the
pthreads-win32@sources.redhat.com
mailing list for the pthreas-win32 project.
Re: Last version of message queues.
- To: Aurelio Medina <AMedina at xcaliber dot com>
- Subject: Re: Last version of message queues.
- From: Ross Johnson <rpj at ise dot canberra dot edu dot au>
- Date: Fri, 03 Aug 2001 11:18:34 +1000
- CC: "'Le Coent Yannick'" <Yannick dot LeCoent at srit dot siemens dot fr>, pthreads-win32 at sourceware dot cygnus dot com
- Organization: University of Canberra, DMT, xISE
- References: <1BDB01B13696D411BD6200D0B7C854EA011768FC@chi-prd-mail1.xcaliber.com>
- Reply-To: rpj at ise dot canberra dot edu dot au
Hi Aurelio,
Last time I looked you needed PTHREAD_PROCESS_SHARED mutexes
and condition variables. The code you just sent does the same
as last time.
_POSIX_THREAD_PROCESS_SHARED isn't defined in pthreads-win32, nor
in Linux I believe (although I could be out of date there).
For example, in mq_open() you have the following code:
if ( (i = pthread_mutexattr_init(&mattr)) != 0)
goto pthreaderr;
pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED);
i = pthread_mutex_init(&mqhdr->mqh_lock, &mattr);
pthread_mutexattr_destroy(&mattr); /* be sure to destroy */
if (i != 0)
goto pthreaderr;
if ( (i = pthread_condattr_init(&cattr)) != 0)
goto pthreaderr;
pthread_condattr_setpshared(&cattr, PTHREAD_PROCESS_SHARED);
i = pthread_cond_init(&mqhdr->mqh_wait, &cattr);
The *attr_setpshared() calls will be returning ENOSYS errors.
Ross
Aurelio Medina wrote:
>
> Here is my latest port of the POSIX message queue interface. I contributed
> my code to PThreads-Win32 some time ago. I'm not sure if its available on
> the Web Site.
>
> Anyhow, I'm using this implementation along with Pthreads-Win32 in a
> production real-time trading application with no problems.
>
> Hope this helps,
> Aurelio Medina
>
> -----Original Message-----
> From: Le Coent Yannick [mailto:Yannick.LeCoent@srit.siemens.fr]
> Sent: Thursday, August 02, 2001 9:27 AM
> To: pthreads-win32@sourceware.cygnus.com
> Subject: Last version of message queues.
>
> Hello,
>
> Can anyone tell me where I could find the latest sources for the message
> queues?
>
> Thanks a lot,
> Yannick LE COENT
> SIEMENS Réseaux Informatiques et Télécommunications
> 3, rue Blaise Pascal
> F - 22300 LANNION
>
> Tel.: +33-2-96 48 74 26
> Fax: +33-2-96 48 74 73
> E-mail: Yannick.LeCoent@srit.siemens.fr
> <mailto:Yannick.LeCoent@srit.siemens.fr>
>
> ------------------------------------------------------------------------
> Name: mqueue.c
> mqueue.c Type: unspecified type (application/octet-stream)
> Encoding: quoted-printable
>
> mqueue.hName: mqueue.h
> Type: unspecified type (application/octet-stream)