From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Critical sections Date: Thu, 13 Nov 2008 23:44:24 +0100 Message-ID: <87prkzz1o7.fsf_-_@gnu.org> References: <3ae3aa420811122028w3c069b88q93a8290385188f79@mail.gmail.com> <3ae3aa420811122056x3d2b2f75nc22a66ae1d977902@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1226616291 22639 80.91.229.12 (13 Nov 2008 22:44:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Nov 2008 22:44:51 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Nov 13 23:45:53 2008 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L0kwi-0002vg-DI for guile-devel@m.gmane.org; Thu, 13 Nov 2008 23:45:52 +0100 Original-Received: from localhost ([127.0.0.1]:58311 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0kva-0001Ua-Dc for guile-devel@m.gmane.org; Thu, 13 Nov 2008 17:44:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0kvY-0001UV-4V for guile-devel@gnu.org; Thu, 13 Nov 2008 17:44:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0kvV-0001UJ-Oa for guile-devel@gnu.org; Thu, 13 Nov 2008 17:44:38 -0500 Original-Received: from [199.232.76.173] (port=33329 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0kvV-0001UG-J8 for guile-devel@gnu.org; Thu, 13 Nov 2008 17:44:37 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:46400 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L0kvV-0005Vk-6L for guile-devel@gnu.org; Thu, 13 Nov 2008 17:44:37 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1L0kvR-0002fO-VD for guile-devel@gnu.org; Thu, 13 Nov 2008 22:44:33 +0000 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Nov 2008 22:44:33 +0000 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Nov 2008 22:44:33 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 23 Brumaire an 217 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: i686-pc-linux-gnu User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) Cancel-Lock: sha1:xVrH8i0CSApXIfbo24ui/vr+uTA= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:7840 Archived-At: Hi, Andy Wingo writes: > I think the idea behind the check sounds good -- it is incorrect to > throw from within a critical section, and the check detects this. > > But the check is incorrect as you noticed, it should be checking if the > current thread is in a critical section. > > So we have two options, to remove the check or to fix the critical > section counter (possiblity to be thread-local). My instinct would be > that removal is the correct solution in 1.8, and that in master the > decision depends on whether we merge the BDW GC or not, and what the > impact that GC has on the idea of critical sections. Looking at uses of critical sections, it's not always clear what the rationale is. In some cases, e.g., `scm_sys_modify_instance ()' and `scm_sys_modify_class ()', it's used to make an operation atomic. In other cases, it seems to be used as a coarse-grain mutex (e.g., `scm_symbol_to_keyword ()', `scm_set_object_property_x ()'). So, at first sight, I'm not sure changing GCs would lead us to change that. Thanks, Ludo'.