From owner-p4-projects@FreeBSD.ORG Mon Feb 14 11:05:13 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4D59116A4CF; Mon, 14 Feb 2005 11:05:13 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0BF0216A4CF for ; Mon, 14 Feb 2005 11:05:13 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8E2C43D46 for ; Mon, 14 Feb 2005 11:05:12 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j1EB5CNn099870 for ; Mon, 14 Feb 2005 11:05:12 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j1EB5C9h099867 for perforce@freebsd.org; Mon, 14 Feb 2005 11:05:12 GMT (envelope-from davidxu@freebsd.org) Date: Mon, 14 Feb 2005 11:05:12 GMT Message-Id: <200502141105.j1EB5C9h099867@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 71049 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2005 11:05:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=71049 Change 71049 by davidxu@davidxu_tiger on 2005/02/14 11:04:56 Child process does not own mutexes forked from parent, considering a shared mutex, you can not unlocked it, it is owned by parent process! Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutex.c#17 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutex.c#17 (text+ko) ==== @@ -260,6 +260,10 @@ void _mutex_fork(struct pthread *curthread) { + TAILQ_INIT(&curthread->mutexq); + TAILQ_INIT(&curthread->pri_mutexq); + curthread->priority_mutex_count = 0; +#if 0 struct pthread_mutex *m; TAILQ_FOREACH(m, &curthread->mutexq, m_qe) { @@ -272,6 +276,7 @@ _thr_umtx_init(&m->m_lock); TAILQ_INIT(&m->m_queue); } +#endif } int