This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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/


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