From owner-freebsd-threads@FreeBSD.ORG Thu Mar 11 05:59:18 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 776FE16A4CE for ; Thu, 11 Mar 2004 05:59:18 -0800 (PST) Received: from mxfep01.bredband.com (mxfep01.bredband.com [195.54.107.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30C7043D2D for ; Thu, 11 Mar 2004 05:59:17 -0800 (PST) (envelope-from torger@ludd.luth.se) Received: ([213.115.124.33] [213.115.124.33]) by mxfep01.bredband.com with ESMTP <20040311135911.PKA20089.mxfep01.bredband.com@c-217c73d5.022-251-6c756c10.cust.bredbandsbolaget.se> for ; Thu, 11 Mar 2004 14:59:11 +0100 From: Anders Torger To: freebsd-threads@freebsd.org Date: Thu, 11 Mar 2004 14:59:11 +0100 User-Agent: KMail/1.6.1 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200403111459.11287.torger@ludd.luth.se> Subject: Does PTHREAD_MUTEX_INITIALIZER work? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Mar 2004 13:59:18 -0000 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