Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: Dave Butenhof <butenhof@zko.dec.com>
Subject: Re: A query on DEC pthreads_mutex..
Date: 1997/04/21	[thread overview]
Message-ID: <335B523A.4B76@zko.dec.com> (raw)
In-Reply-To: 5jcov6$2c1@cucumber.demon.co.uk


Andrew Gabriel wrote:
> 
> In article <33574AE0.36B6@wipsys.stph.net>,
>         Kamal Kishore Mantri <kamal@wipsys.stph.net> writes:
> >
> >       In Digital UNIX 4.0, if I allocate the 'pthread_mutex' on
> >shared memory, can I use that mutex for synchronisation among the
> >threads in different processes ?
> 
> pthread_mutexs can be either PTHREAD_PROCESS_PRIVATE (default) which
> means they only work between threads in the same process, or they
> can be PTHREAD_PROCESS_SHARED in which case they work between threads
> in different processes also.
> 
> I am pretty certain (but not 100%) that Digital UNIX 4.0 does support
> PTHREAD_PROCESS_SHARED. Check man pages for pthread_mutexattr_init()
> and pthread_mutexattr_setpshared() for how to set PTHREAD_PROCESS_SHARED.

No, Digital UNIX does not (yet) support PTHREAD_PROCESS_SHARED. This is
an optional POSIX feature, which for various reasons (priority,
schedule, etc.) we initially chose not to implement. I can promise that
we WILL support it in the future. (I'll even tell you that the new
X/Open brand followon to UNIX95, called UNIX98, requires the pshared
option, along with several other POSIX options.)

You can always tell whether a system supports the pshared attribute by
looking in <unistd.h> for the symbol _POSIX_THREAD_PROCESS_SHARED. If
defined, then the "pshared" attribute is supported -- if not defined,
the attribute is not supported.

/---[ Dave Butenhof ]-----------------------[ butenhof@zko.dec.com ]---\
| Digital Equipment Corporation           110 Spit Brook Rd ZKO2-3/Q18 |
| 603.881.2218, FAX 603.881.0120                  Nashua NH 03062-2698 |
\-----------------[ Better Living Through Concurrency ]----------------/



      reply	other threads:[~1997-04-21  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-18  4:00 A query on DEC pthreads_mutex Kamal Kishore Mantri
1997-04-19  4:00 ` Ron Harter
1997-04-20  4:00 ` Andrew Gabriel
1997-04-21  4:00   ` Dave Butenhof [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox