From owner-cvs-src-old@FreeBSD.ORG Wed Sep 1 03:11:40 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F401810656A4 for ; Wed, 1 Sep 2010 03:11:39 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E216F8FC21 for ; Wed, 1 Sep 2010 03:11:39 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o813BdHj088121 for ; Wed, 1 Sep 2010 03:11:39 GMT (envelope-from davidxu@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o813BdI0088120 for cvs-src-old@freebsd.org; Wed, 1 Sep 2010 03:11:39 GMT (envelope-from davidxu@repoman.freebsd.org) Message-Id: <201009010311.o813BdI0088120@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to davidxu@repoman.freebsd.org using -f From: David Xu Date: Wed, 1 Sep 2010 03:11:21 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libthr/thread thr_fork.c thr_init.c thr_mutex.c thr_private.h thr_umtx.c thr_umtx.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2010 03:11:40 -0000 davidxu 2010-09-01 03:11:21 UTC FreeBSD src repository Modified files: lib/libthr/thread thr_fork.c thr_init.c thr_mutex.c thr_private.h thr_umtx.c thr_umtx.h Log: SVN rev 212077 on 2010-09-01 03:11:21Z by davidxu Change atfork lock from mutex to rwlock, also make mutexes used by malloc() module private type, when private type mutex is locked/unlocked, thread critical region is entered or leaved. These changes makes fork() async-signal safe which required by POSIX. Note that user's atfork handler still needs to be async-signal safe, but it is not problem of libthr, it is user's responsiblity. Revision Changes Path 1.18 +22 -19 src/lib/libthr/thread/thr_fork.c 1.54 +2 -2 src/lib/libthr/thread/thr_init.c 1.76 +23 -5 src/lib/libthr/thread/thr_mutex.c 1.105 +2 -1 src/lib/libthr/thread/thr_private.h 1.20 +7 -0 src/lib/libthr/thread/thr_umtx.c 1.17 +4 -1 src/lib/libthr/thread/thr_umtx.h