From owner-cvs-all Sun Aug 2 10:04:27 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA27796 for cvs-all-outgoing; Sun, 2 Aug 1998 10:04:27 -0700 (PDT) (envelope-from owner-cvs-all) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA27791; Sun, 2 Aug 1998 10:04:26 -0700 (PDT) (envelope-from alex@FreeBSD.org) From: Alex Nash Received: (from alex@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id KAA02593; Sun, 2 Aug 1998 10:04:26 -0700 (PDT) Date: Sun, 2 Aug 1998 10:04:26 -0700 (PDT) Message-Id: <199808021704.KAA02593@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: cvs commit: src/lib/libc_r/uthread uthread_mutex.c Sender: owner-cvs-all@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk alex 1998/08/02 10:04:25 PDT Modified files: lib/libc_r/uthread uthread_mutex.c Log: Fixed a race condition during the first lock/trylock of a statically initialized mutex. Statically initialized mutexes are actually initialized at first use (pthread_mutex_lock/pthread_mutex_trylock). To prevent concurrent initialization by multiple threads, all static initializations are now serialized by a spinlock. Reviewed by: jb Revision Changes Path 1.8 +21 -4 src/lib/libc_r/uthread/uthread_mutex.c