From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH]: Critical section checked for incorrect thread. Date: Tue, 16 Dec 2008 23:21:37 +0100 Message-ID: References: <3ae3aa420812131539v7eb5e53dp65cb12d2dc67cc18@mail.gmail.com> <87abaz39u2.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1229466950 28255 80.91.229.12 (16 Dec 2008 22:35:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Dec 2008 22:35:50 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Dec 16 23:36: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 1LCiX2-0003a0-Px for guile-devel@m.gmane.org; Tue, 16 Dec 2008 23:36:49 +0100 Original-Received: from localhost ([127.0.0.1]:49357 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCiVq-0002pt-AG for guile-devel@m.gmane.org; Tue, 16 Dec 2008 17:35:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCiVm-0002pA-AX for guile-devel@gnu.org; Tue, 16 Dec 2008 17:35:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCiVj-0002n8-Ge for guile-devel@gnu.org; Tue, 16 Dec 2008 17:35:29 -0500 Original-Received: from [199.232.76.173] (port=44615 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCiVj-0002mj-8z for guile-devel@gnu.org; Tue, 16 Dec 2008 17:35:27 -0500 Original-Received: from a-sasl-fastnet.sasl.smtp.pobox.com ([207.106.133.19]:37026 helo=sasl.smtp.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LCiVb-0001jS-1o; Tue, 16 Dec 2008 17:35:19 -0500 Original-Received: from localhost.localdomain (unknown [127.0.0.1]) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTP id D195587A74; Tue, 16 Dec 2008 17:35:16 -0500 (EST) Original-Received: from unquote (unknown [81.34.240.175]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTPSA id EDE5987A6F; Tue, 16 Dec 2008 17:35:14 -0500 (EST) In-Reply-To: <87abaz39u2.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Sun, 14 Dec 2008 00:59:49 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Pobox-Relay-ID: CFEC1526-CBC1-11DD-A9A7-5720C92D7133-02397024!a-sasl-fastnet.pobox.com X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) 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:7933 Archived-At: On Sun 14 Dec 2008 00:59, ludo@gnu.org (Ludovic Court=C3=A8s) writes: >> - if (scm_i_critical_section_level) >> + if (SCM_I_CURRENT_THREAD->block_asyncs) > > It seems to me that "throw from within critical section" means precisely > "throw when SCM_I_CRITICAL_SECTION_LEVEL is non-zero". I don't see what > asyncs have to do with that. When scm_i_critical_section_level is nonzero, t->block_asyncs is nonzero. The reverse is not true. So... two options then: make this change, hoping that we don't get too many throws when asyncs are blocked for other reasons... sounds not so good. Or we remove the check entirely, hoping that there's not too much erroneous code out there that this check would help. It seems like we should do the latter, and in 1.9 make it a goal to remove critical sections entirely, all 45 uses or so, replacing them with finer-grained mutexen or redoing the code. Andy --=20 http://wingolog.org/