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: Last version of message queues.


Ross,

I am using the 2000-12-29 snapshot.  Do you return an error in newer
snapshots.  If so, let me know and I can update the code.

Aurelio
-----Original Message-----
From: Ross Johnson [mailto:rpj@ise.canberra.edu.au]
Sent: Thursday, August 02, 2001 11:49 PM
To: Aurelio Medina; 'Le Coent Yannick';
pthreads-win32@sourceware.cygnus.com
Subject: Re: Last version of message queues.


Aurelio,

Ross Johnson wrote:
> 
> 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.
> 

I apologise - it's pthread_{mutex,cond}_init() that should be
returning ENOSYS, not *attr_setpshared(). Since you're catching
that I'm now confused so I'll go take a longer harder look.

Sorry.
Ross


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