From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: emacs-unicode-2 bootstrap on FreeBSD (temacs coredump) Date: Wed, 01 Aug 2007 11:20:26 +0200 Message-ID: <46B0505A.9010208@swipnet.se> References: <46AA17BD.7080900@netasq.com> <46AC6849.1010400@swipnet.se> <20070731190955.GA11917@oslo.ath.cx> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1185960050 25796 80.91.229.12 (1 Aug 2007 09:20:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 1 Aug 2007 09:20:50 +0000 (UTC) Cc: "Herbert J. Skuhra" , emacs-devel@gnu.org To: YAMAMOTO Mitsuharu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 01 11:20:43 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 1IGANl-00076E-VH for ged-emacs-devel@m.gmane.org; Wed, 01 Aug 2007 11:20:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IGANl-0002JZ-BF for ged-emacs-devel@m.gmane.org; Wed, 01 Aug 2007 05:20:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IGANg-0002Gd-0h for emacs-devel@gnu.org; Wed, 01 Aug 2007 05:20:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IGANd-0002CP-M6 for emacs-devel@gnu.org; Wed, 01 Aug 2007 05:20:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IGANd-0002CL-Hk for emacs-devel@gnu.org; Wed, 01 Aug 2007 05:20:33 -0400 Original-Received: from av9-2-sn3.vrr.skanova.net ([81.228.9.186]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IGANd-0001yH-6n for emacs-devel@gnu.org; Wed, 01 Aug 2007 05:20:33 -0400 Original-Received: by av9-2-sn3.vrr.skanova.net (Postfix, from userid 502) id 1BE9A38268; Wed, 1 Aug 2007 11:20:32 +0200 (CEST) Original-Received: from smtp3-2-sn3.vrr.skanova.net (smtp3-2-sn3.vrr.skanova.net [81.228.9.102]) by av9-2-sn3.vrr.skanova.net (Postfix) with ESMTP id D6A7837F57; Wed, 1 Aug 2007 11:20:31 +0200 (CEST) Original-Received: from husetbladh.homeip.net (81-235-205-78-no59.tbcn.telia.com [81.235.205.78]) by smtp3-2-sn3.vrr.skanova.net (Postfix) with ESMTP id 7DD9B37E42; Wed, 1 Aug 2007 11:20:30 +0200 (CEST) User-Agent: Thunderbird 2.0.0.5 (X11/20070719) In-Reply-To: X-Detected-Kernel: Linux 2.4-2.6 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:75893 Archived-At: YAMAMOTO Mitsuharu skrev: > > A comment in src/lib/libc/stdlib/malloc.c (FreeBSD Current) says: > > /* > * Mutexes based on spinlocks. We can't use normal pthread mutexes, because > * they require malloc()ed memory. > */ > > So it seems to be impossible to make src/gmalloc.c thread-safe only > using pthread mutexes. 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'm not sure if spinlocks are open to user applications, but anyway it > would be simpler to define SYSTEM_MALLOC when HAVE_GTK_AND_PTHREAD && > !DOUG_LEA_MALLOC, and abandon emacs_blocked_malloc etc. on such > platforms. I don't care if my changes made to src/gmalloc.c for > thread-safety is reverted. That is always a possibility. I'll look into both. Jan D.