From owner-cvs-src@FreeBSD.ORG Thu May 29 13:54:01 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC94337B401; Thu, 29 May 2003 13:54:01 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A6FF43F85; Thu, 29 May 2003 13:54:01 -0700 (PDT) (envelope-from mtm@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4TKs10U060924; Thu, 29 May 2003 13:54:01 -0700 (PDT) (envelope-from mtm@repoman.freebsd.org) Received: (from mtm@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4TKs1ic060923; Thu, 29 May 2003 13:54:01 -0700 (PDT) Message-Id: <200305292054.h4TKs1ic060923@repoman.freebsd.org> From: Mike Makonnen Date: Thu, 29 May 2003 13:54:01 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libthr/thread thr_cond.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2003 20:54:02 -0000 mtm 2003/05/29 13:54:01 PDT FreeBSD src repository Modified files: lib/libthr/thread thr_cond.c Log: Use a static lock to ake sure pthread_cond_* functions called from multiple threads don't initialze the same condition variable more than once. Explicitly compare cond pointers with PTHREAD_COND_INITIALIZER instead of NULL. Just because it happens to be defined as NULL is no reason to encourage the idea that people can call those functions with NULL pointers to a condition variable. Approved by: re/jhb Revision Changes Path 1.7 +20 -2 src/lib/libthr/thread/thr_cond.c