Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Mar 2004 16:16:15 +0100
From:      Anders Torger <torger@ludd.luth.se>
To:        Petri Helenius <pete@he.iki.fi>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: Does PTHREAD_MUTEX_INITIALIZER work?
Message-ID:  <200403111616.15668.torger@ludd.luth.se>
In-Reply-To: <40507287.1040203@he.iki.fi>
References:  <200403111459.11287.torger@ludd.luth.se> <40507287.1040203@he.iki.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 11 March 2004 15.07, you wrote:
> Anders Torger wrote:
> >Do the PTHREAD_MUTEX_INITIALIZER and PTHREAD_COND_INITIALIZER macros
> >really work?
> >
> >What puzzles me is that pthread.h says:
> >
> >#define PTHREAD_MUTEX_INITIALIZER       NULL
> >#define PTHREAD_COND_INITIALIZER        NULL
> >
> >that is the initialisers are NULL.
> >
> >I get some strange random temporary lockups and deaths in my program
> >when running it on FreeBSD (5.0), while it works flawlessy on Linux,
> >and one reason could perhaps be that the initialisers do not work on
> >FreeBSD.
>
> 5.0 is an early new technology release, I would suggest using 5.2.1
> when reporting issues.

PTHREAD_MUTEX_INITIALIZER is defined as NULL in 5.2.1 too. I shall test 
the software on that platform later though. However, it would be nice 
if someone could explain this NULL thing (it is not NULL on other 
pthread implementations I have looked at). Perhaps there is a perfectly 
natural explanation?

/Anders Torger



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403111616.15668.torger>