From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: emacs-unicode-2 bootstrap on FreeBSD (temacs coredump) Date: Wed, 01 Aug 2007 19:07:47 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <46AA17BD.7080900@netasq.com> <46AC6849.1010400@swipnet.se> <20070731190955.GA11917@oslo.ath.cx> <46B0505A.9010208@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1185962901 2893 80.91.229.12 (1 Aug 2007 10:08:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 1 Aug 2007 10:08:21 +0000 (UTC) Cc: "Herbert J. Skuhra" , emacs-devel@gnu.org To: Jan =?ISO-8859-1?Q?Dj=E4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 01 12:08:13 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IGB7i-0005gi-Sb for ged-emacs-devel@m.gmane.org; Wed, 01 Aug 2007 12:08:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IGB7h-00008Q-4k for ged-emacs-devel@m.gmane.org; Wed, 01 Aug 2007 06:08:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IGB7R-00006q-Ap for emacs-devel@gnu.org; Wed, 01 Aug 2007 06:07:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IGB7N-00005l-Vu for emacs-devel@gnu.org; Wed, 01 Aug 2007 06:07:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IGB7N-00005i-Iu for emacs-devel@gnu.org; Wed, 01 Aug 2007 06:07:49 -0400 Original-Received: from ntp.math.s.chiba-u.ac.jp ([133.82.132.2] helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IGB7M-0004Bz-Sy for emacs-devel@gnu.org; Wed, 01 Aug 2007 06:07:49 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 429332C40; Wed, 1 Aug 2007 19:07:47 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.1.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-Detected-Kernel: NetBSD 3.0 (DF) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:75897 Archived-At: >>>>> On Wed, 01 Aug 2007 18:35:40 +0900, YAMAMOTO Mitsuharu said: >> Totally thread safe is impossible, but for Emacs we don't need >> that. It should be OK to initialize gmalloc in a non-thread safe >> way because it is done in main (or possibly before) before any >> threads are created. > I didn't mean the initialization problem with respect to > pthread_once. The followup report shows that there's another > infinite recursion like pthread_mutex_lock -> -> malloc -> -> > pthread_mutex_lock -> ... when a certain (statically initialized) > mutex is used first. Ah, maybe I misunderstood what you mean. It might be possible to call pthread_mutex_init for all malloc mutexes at the (non-thread-safe) initialization stage with temporarily disabling the use of the mutexes. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp