From owner-cvs-src@FreeBSD.ORG Tue Nov 4 11:49:57 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 9B2F916A4CE; Tue, 4 Nov 2003 11:49:57 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A01A43FAF; Tue, 4 Nov 2003 11:49:57 -0800 (PST) (envelope-from deischen@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hA4JnuXJ058015; Tue, 4 Nov 2003 11:49:56 -0800 (PST) (envelope-from deischen@repoman.freebsd.org) Received: (from deischen@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hA4Jnuua058014; Tue, 4 Nov 2003 11:49:56 -0800 (PST) (envelope-from deischen) Message-Id: <200311041949.hA4Jnuua058014@repoman.freebsd.org> From: Daniel Eischen Date: Tue, 4 Nov 2003 11:49:56 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libc/stdlib malloc.c src/lib/libc/include libc_private.h 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: Tue, 04 Nov 2003 19:49:57 -0000 deischen 2003/11/04 11:49:56 PST FreeBSD src repository Modified files: lib/libc/stdlib malloc.c lib/libc/include libc_private.h Log: Externalize malloc's spinlock so that a thread library can take it around an application's fork() call. Our new thread libraries (libthr, libpthread) can now have threads running while another thread calls fork(). In this case, it is possible for malloc to be left in an inconsistent state in the child. Our thread libraries, libpthread in particular, need to use malloc internally after a fork (in the child). Reviewed by: davidxu Revision Changes Path 1.10 +8 -0 src/lib/libc/include/libc_private.h 1.83 +1 -0 src/lib/libc/stdlib/malloc.c