Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Mar 2004 14:59:11 +0100
From:      Anders Torger <torger@ludd.luth.se>
To:        freebsd-threads@freebsd.org
Subject:   Does PTHREAD_MUTEX_INITIALIZER work?
Message-ID:  <200403111459.11287.torger@ludd.luth.se>

next in thread | raw e-mail | index | archive | help

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.

/Anders Torger



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