1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

(scm_with_blocked_asyncs, scm_with_unblocked_asyncs): New.

This commit is contained in:
Marius Vollmer 2004-01-04 23:36:49 +00:00
parent e049920715
commit b57a0953fe
2 changed files with 22 additions and 2 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002 Free Software Foundation, Inc.
/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2004 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -364,6 +364,24 @@ scm_c_call_with_unblocked_asyncs (void *(*proc) (void *data), void *data)
data, NULL);
}
void
scm_with_blocked_asyncs ()
{
scm_on_rewind (increase_block, NULL, SCM_F_WIND_EXPLICITELY);
scm_on_unwind (decrease_block, NULL, SCM_F_WIND_EXPLICITELY);
}
void
scm_with_unblocked_asyncs ()
{
if (scm_root->block_asyncs == 0)
scm_misc_error ("scm_with_unblocked_asyncs",
"asyncs already unblocked", SCM_EOL);
scm_on_rewind (decrease_block, NULL, SCM_F_WIND_EXPLICITELY);
scm_on_unwind (increase_block, NULL, SCM_F_WIND_EXPLICITELY);
}
void