From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,da0a3bd67223917 X-Google-Attributes: gidfc89c,public X-Google-Thread: 10650a,da0a3bd67223917 X-Google-Attributes: gid10650a,public X-Google-Thread: 1164f8,da0a3bd67223917 X-Google-Attributes: gid1164f8,public X-Google-Thread: f678f,da0a3bd67223917 X-Google-Attributes: gidf678f,public From: andrew@cucumber.demon.co.uk (Andrew Gabriel) Subject: Re: A query on DEC pthreads_mutex.. Date: 1997/04/20 Message-ID: <5jcov6$2c1@cucumber.demon.co.uk>#1/1 X-Deja-AN: 236139274 X-NNTP-Posting-Host: cucumber.demon.co.uk References: <33574AE0.36B6@wipsys.stph.net> Organization: home Newsgroups: comp.sys.dec,comp.unix.osf.misc,comp.unix.internals,comp.unix.programmer In article <33574AE0.36B6@wipsys.stph.net>, Kamal Kishore Mantri writes: >Hi, > > 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. -- Andrew Gabriel Home: Andrew@cucumber.demon.co.uk Consultant Software Engineer Work: Andrew.Gabriel@net-tel.co.uk