guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Locks and threads


From: Neil Jerram
Subject: Re: Locks and threads
Date: Thu, 05 Mar 2009 21:25:52 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Linas Vepstas <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]