From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: advice needed for multi-threading patch Date: Thu, 27 Aug 2009 13:02:52 -0400 Message-ID: References: <9DE0B828-815B-45DA-BD2B-0AB4DAD59CE2@raeburn.org> <7CBF8DB5-75C0-4749-9219-F55ABE988BB0@raeburn.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1251392598 29546 80.91.229.12 (27 Aug 2009 17:03:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Aug 2009 17:03:18 +0000 (UTC) Cc: Tom Tromey , Emacs development discussions To: Ken Raeburn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 27 19:03:11 2009 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 1MgiNS-0003DU-97 for ged-emacs-devel@m.gmane.org; Thu, 27 Aug 2009 19:03:10 +0200 Original-Received: from localhost ([127.0.0.1]:40037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgiNR-00058k-NN for ged-emacs-devel@m.gmane.org; Thu, 27 Aug 2009 13:03:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MgiNL-00057b-Ts for emacs-devel@gnu.org; Thu, 27 Aug 2009 13:03:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MgiNH-00053I-8V for emacs-devel@gnu.org; Thu, 27 Aug 2009 13:03:03 -0400 Original-Received: from [199.232.76.173] (port=59800 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgiNH-00053A-2b for emacs-devel@gnu.org; Thu, 27 Aug 2009 13:02:59 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:46889) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MgiNG-0003tP-Fz for emacs-devel@gnu.org; Thu, 27 Aug 2009 13:02:58 -0400 Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n7RH2qsi010933; Thu, 27 Aug 2009 13:02:53 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id B26633A06F; Thu, 27 Aug 2009 13:02:52 -0400 (EDT) In-Reply-To: <7CBF8DB5-75C0-4749-9219-F55ABE988BB0@raeburn.org> (Ken Raeburn's message of "Thu, 27 Aug 2009 02:28:19 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3350=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:114692 Archived-At: >> Emacs's stack scanning already has to check both Lisp_Object values >> (i.e. tagged pointers) and plain direct untagged pointers. This was >> needed IIRC because even if the C code appears to hold on to >> a Lisp_Object value, the optimizer may get rid of it and only keep the >> untagged pointer. > Does that mean that GC_USE_GCPROS_AS_BEFORE doesn't work reliably? It's very little tested, but it should work reliably. The reason it works reliably is that the GCPRO macros cause the Lisp_Object variables to be accessed via "&" and their address is stored in a globally accessible data structure, so the compiler cannot optimize those variables away, or even keep them in registers. Stefan