From owner-cvs-src@FreeBSD.ORG Sat Oct 23 23:28:36 2004 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 EAA3A16A4EC; Sat, 23 Oct 2004 23:28:36 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC92743D5C; Sat, 23 Oct 2004 23:28:36 +0000 (GMT) (envelope-from davidxu@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i9NNSaOE033520; Sat, 23 Oct 2004 23:28:36 GMT (envelope-from davidxu@repoman.freebsd.org) Received: (from davidxu@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i9NNSaBT033519; Sat, 23 Oct 2004 23:28:36 GMT (envelope-from davidxu) Message-Id: <200410232328.i9NNSaBT033519@repoman.freebsd.org> From: David Xu Date: Sat, 23 Oct 2004 23:28:36 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libpthread/thread thr_create.cthr_find_thread.c thr_kern.c thr_private.h thr_sig.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: Sat, 23 Oct 2004 23:28:37 -0000 davidxu 2004-10-23 23:28:36 UTC FreeBSD src repository Modified files: lib/libpthread/thread thr_create.c thr_find_thread.c thr_kern.c thr_private.h thr_sig.c Log: 1. Move thread list flags into new separate member, and atomically put DEAD thread on GC list, this closes a race between pthread_join and thr_cleanup. 2. Introduce a mutex to protect tcb initialization, tls allocation and deallocation code in rtld seems no lock protection or it is broken, under stress testing, memory is corrupted. Reviewed by: deischen patch partly provided by: deischen Revision Changes Path 1.58 +1 -0 src/lib/libpthread/thread/thr_create.c 1.14 +1 -1 src/lib/libpthread/thread/thr_find_thread.c 1.115 +27 -10 src/lib/libpthread/thread/thr_kern.c 1.119 +15 -11 src/lib/libpthread/thread/thr_private.h 1.81 +1 -2 src/lib/libpthread/thread/thr_sig.c