From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Perry E. Metzger" Newsgroups: gmane.emacs.devel Subject: Re: Can we go GTK-only? Date: Tue, 1 Nov 2016 15:15:49 -0400 Message-ID: <20161101151549.1cd887d6@jabberwock.cb.piermont.com> References: <24db2975-17ca-ad01-20c8-df12071fa89a@dancol.org> <4615E73A-19E2-4B79-9889-D3FA686DDDE6@raeburn.org> <83bmy0pl8p.fsf@gnu.org> <831sywp7ew.fsf@gnu.org> <83y413nsjm.fsf@gnu.org> <403a4fd8-f9da-82df-956b-a3187de83cf9@cs.ucla.edu> <83lgx3no0k.fsf@gnu.org> <633d43c4-946e-e318-d8de-be1c2fde26f7@dancol.org> <83eg2vnn4s.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1478027767 25767 195.159.176.226 (1 Nov 2016 19:16:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 1 Nov 2016 19:16:07 +0000 (UTC) Cc: Daniel Colascione , emacs-devel@gnu.org, raeburn@raeburn.org, monnier@iro.umontreal.ca, eggert@cs.ucla.edu To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 01 20:16:02 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1eXQ-000648-A1 for ged-emacs-devel@m.gmane.org; Tue, 01 Nov 2016 20:16:00 +0100 Original-Received: from localhost ([::1]:50716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1eXT-0005YH-2b for ged-emacs-devel@m.gmane.org; Tue, 01 Nov 2016 15:16:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1eXM-0005YC-BX for emacs-devel@gnu.org; Tue, 01 Nov 2016 15:15:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1eXL-00015j-7d for emacs-devel@gnu.org; Tue, 01 Nov 2016 15:15:56 -0400 Original-Received: from hacklheber.piermont.com ([166.84.7.14]:46211) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c1eXG-000152-QS; Tue, 01 Nov 2016 15:15:50 -0400 Original-Received: from snark.cb.piermont.com (localhost [127.0.0.1]) by hacklheber.piermont.com (Postfix) with ESMTP id 5D3E2678; Tue, 1 Nov 2016 15:15:50 -0400 (EDT) Original-Received: from jabberwock.cb.piermont.com (jabberwock.cb.piermont.com [10.160.2.107]) by snark.cb.piermont.com (Postfix) with ESMTP id 36A982DE01E; Tue, 1 Nov 2016 15:15:50 -0400 (EDT) In-Reply-To: <83eg2vnn4s.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 166.84.7.14 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:209084 Archived-At: On Tue, 01 Nov 2016 19:08:51 +0200 Eli Zaretskii wrote: > > Cc: raeburn@raeburn.org, monnier@iro.umontreal.ca, > > emacs-devel@gnu.org From: Daniel Colascione > > Date: Tue, 1 Nov 2016 09:54:51 -0700 > > > > >> > gmalloc is only thread-safe if Emacs is built with > > >> > pthreads. > > >> > > >> Yes, and that's what one would expect. If you build Emacs in > > >> single-threaded mode, malloc won't be thread-safe. But in the > > >> normal case nowadays, malloc should be thread-safe. > > > > > > pthreads is not the only way to have threads. > > > > On any modern system POSIX system it is. Counterexample, please. > > You can find them yourself if you are interested. I have more > important things to do with my time. You do realize that this means that most of the rest of us are not going to take your claim seriously. I cannot name a) a POSIX system that uses a threading system other than pthreads (which makes sense since the POSIX standard mandates pthreads) b) any system that implements both C and threads where malloc is not thread safe and has not always been thread safe since the threading implementation was shipped (which makes sense because otherwise no threaded software would be stable). It is possible such systems existed long ago. They do not now. If you claim you can find such things but that you do not choose to, I think the rest of us are simply going to believe your claim as false. As for non-POSIX systems Emacs runs on, the only significant one is Windows, and in Windows, malloc is thread safe in threaded code, just as one would expect. Perry -- Perry E. Metzger perry@piermont.com