From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: Locks and threads Date: Thu, 05 Mar 2009 21:25:52 +0000 Message-ID: <87ab7zvezj.fsf@arudy.ossau.uklinux.net> References: <87mycsd2rj.fsf@arudy.ossau.uklinux.net> <87vdqovofz.fsf@arudy.ossau.uklinux.net> <3ae3aa420903041954l5b207967j35a690bc4c52377@mail.gmail.com> <87r61bvjlc.fsf@arudy.ossau.uklinux.net> <87mybzvipu.fsf@arudy.ossau.uklinux.net> <3ae3aa420903051257n131d1c9eg7a89b587c224531a@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 1236288375 8598 80.91.229.12 (5 Mar 2009 21:26:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Mar 2009 21:26:15 +0000 (UTC) Cc: Guile Development To: linasvepstas@gmail.com Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Mar 05 22:27:32 2009 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 1LfL6D-0005ja-5f for guile-devel@m.gmane.org; Thu, 05 Mar 2009 22:27:25 +0100 Original-Received: from localhost ([127.0.0.1]:37698 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LfL4r-0004Wr-Of for guile-devel@m.gmane.org; Thu, 05 Mar 2009 16:26:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LfL4m-0004Wk-95 for guile-devel@gnu.org; Thu, 05 Mar 2009 16:25:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LfL4l-0004WX-M2 for guile-devel@gnu.org; Thu, 05 Mar 2009 16:25:55 -0500 Original-Received: from [199.232.76.173] (port=43493 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LfL4l-0004WU-Ir for guile-devel@gnu.org; Thu, 05 Mar 2009 16:25:55 -0500 Original-Received: from mail3.uklinux.net ([80.84.72.33]:39143) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LfL4l-0004CO-86 for guile-devel@gnu.org; Thu, 05 Mar 2009 16:25:55 -0500 Original-Received: from arudy (host86-157-180-39.range86-157.btcentralplus.com [86.157.180.39]) by mail3.uklinux.net (Postfix) with ESMTP id 926081F7039; Thu, 5 Mar 2009 21:25:53 +0000 (GMT) Original-Received: from arudy.ossau.uklinux.net (arudy [127.0.0.1]) by arudy (Postfix) with ESMTP id E749138013; Thu, 5 Mar 2009 21:25:52 +0000 (GMT) In-Reply-To: <3ae3aa420903051257n131d1c9eg7a89b587c224531a@mail.gmail.com> (Linas Vepstas's message of "Thu\, 5 Mar 2009 14\:57\:48 -0600") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 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:8230 Archived-At: Linas Vepstas writes: > I don't understand the patch. > > libguile/scmsigs.c has a SCM_CRITICAL_SECTION_START > at line 339, which seems to be balanced by > SCM_CRITICAL_SECTION_END; > at lines 442 and 461, right before the return from > the subroutine. > > So why insert this seemingly un-needed SCM_CRITICAL_SECTION_END, > and worse, nest it in an else block? Because when scm_sigaction_for_thread decides to throw an out-of-range error (by the `SCM_OUT_OF_RANGE' call), it will exit non-locally at that point (by calling `longjmp'). So, in this case, it won't pass through (either of) the SCM_CRITICAL_SECTION_ENDs just before the return statement. Does that make sense now? Neil