mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
* continuations.c (scm_make_continuation): No longer a critical
section. (scm_dynthrow): Abort when scm_i_critical_section_level is not zero.
This commit is contained in:
parent
5e3545d00e
commit
8b7f0bb35b
1 changed files with 8 additions and 0 deletions
|
@ -21,7 +21,9 @@
|
||||||
#include "libguile/_scm.h"
|
#include "libguile/_scm.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "libguile/async.h"
|
||||||
#include "libguile/debug.h"
|
#include "libguile/debug.h"
|
||||||
#include "libguile/root.h"
|
#include "libguile/root.h"
|
||||||
#include "libguile/stackchk.h"
|
#include "libguile/stackchk.h"
|
||||||
|
@ -267,6 +269,12 @@ scm_dynthrow (SCM cont, SCM val)
|
||||||
SCM_STACKITEM *dst = thread->continuation_base;
|
SCM_STACKITEM *dst = thread->continuation_base;
|
||||||
SCM_STACKITEM stack_top_element;
|
SCM_STACKITEM stack_top_element;
|
||||||
|
|
||||||
|
if (scm_i_critical_section_level)
|
||||||
|
{
|
||||||
|
fprintf (stderr, "continuation invoked from within critical section.\n");
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
|
||||||
#if SCM_STACK_GROWS_UP
|
#if SCM_STACK_GROWS_UP
|
||||||
if (dst + continuation->num_stack_items >= &stack_top_element)
|
if (dst + continuation->num_stack_items >= &stack_top_element)
|
||||||
grow_stack (cont, val);
|
grow_stack (cont, val);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue