Re: pthread_mutex_trylock does not lock

2002-12-04 Thread Robert Collins
On Thu, 2002-12-05 at 10:52, Christophe Galerne wrote: > Robert Collins wrote: > > > > I never said that PTHREAD_MUTEX_NORMAL does not block, I was challenging > > the apparent 'cygwin threads' documentation. > > Right, in a way my remarq was OT... =:-D On-Topic for Cygwin, but yes, may have bee

Re: pthread_mutex_trylock does not lock

2002-12-04 Thread Robert Collins
On Thu, 2002-12-05 at 10:47, Christophe Galerne wrote: > > Or you could check the return value from pthread_mutexattr_settype and > > see that it returns EINVAL. > > The thing is it's not really an invalid value for 'type' in the call. > Maybe it would be better to break the compilation of progr

Re: pthread_mutex_trylock does not lock

2002-12-04 Thread Christophe Galerne
Robert Collins wrote: I never said that PTHREAD_MUTEX_NORMAL does not block, I was challenging the apparent 'cygwin threads' documentation. Right, in a way my remarq was OT... =:-D Christophe -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cy

Re: pthread_mutex_trylock does not lock

2002-12-04 Thread Christophe Galerne
Robert Collins wrote: On Thu, 2002-12-05 at 08:33, Christophe Galerne wrote: NB: PT_MUTEX_NORMAL is not a posix mutex type - it's PTHREAD_MUTEX_NORMAL Right that was a typo. Or you could check the return value from pthread_mutexattr_settype and see that it returns EINVAL. The thing is i

RE: pthread_mutex_trylock does not lock

2002-12-04 Thread Robert Collins
On Thu, 2002-12-05 at 08:33, Christophe Galerne wrote: > 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 documen

RE: pthread_mutex_trylock does not lock

2002-12-04 Thread Robert Collins
On Thu, 2002-12-05 at 08:33, Christophe Galerne wrote: > 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. NB: PT_MUTEX_NORMAL is not a posix mutex type - it's PTHREAD_MUTEX_NORMAL.

RE: pthread_mutex_trylock does not lock

2002-12-04 Thread Christophe Galerne
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_

RE: pthread_mutex_trylock does not lock

2002-12-03 Thread Robert Collins
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

Re: pthread_mutex_trylock does not lock

2002-12-03 Thread Robert Collins
On Tue, 2002-12-03 at 20:37, Chris Knight wrote: > Hello, > > I think I have found a problem in the "pthread_mutex_trylock" call. When I > run the following code both the trylock and lock return immediately. If I > compile this under RedHat 8 it works as I would expect with the trylock > locking