delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/12/04/16:35:11

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3DEE74C3.1070208@earthlink.net>
Date: Wed, 04 Dec 2002 13:33:55 -0800
From: Christophe Galerne <christophegalerne AT earthlink DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826
X-Accept-Language: en-us, en, fr-fr, fr
MIME-Version: 1.0
To: cygwin <cygwin AT cygwin DOT com>
Subject: RE: pthread_mutex_trylock does not lock

Robert Collins wrote:
 > On Tue, 2002-12-03 at 23:06, Chris Knight wrote:
 > > Hello Rob,
 > >
 > > I have changed the code, see below.  I now set the type to
 > > PTHREAD_MUTEX_NORMAL but that also does not block.  The only documentation
 > > on cygwin threads say this is the same as PTHREAD_MUTEX_FAST_NP
 >
 > What documentation says that?

This
www.opengroup.org/onlinepubs/7908799/xsh/pthread_mutexattr_settype.html
seems to explain that a PT_MUTEX_NORMAL mutex should behave the way Chris
expect.

If this doc is out-of-date, could you give a pointer to a more accurate
source?

 > We don't support NONRECURSIVE mutex's. I don't know what you mean by
 > NORECURSIVE threads.

Then maybe one should add a comment above
pthread.h(55): #define PTHREAD_MUTEX_NORMAL 2
that this option is not supported.

Also above
pthread.h(57): #define PTHREAD_MUTEX_INITIALIZER (void *)20
a comment that says that a default MUTEX will be recursive
might avoid some surprise. =:-D

Thanks,
Christophe

PS: Could you cc me as I am not on the list? Thanks.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019