mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 00:30:21 +02:00
* async.c (scm_sys_tick_async_thunk): commented out. I'm not
sure how this was supposed to work. (scm_async_click): don't send SCM_TICK_SIGNAL. (scm_init_async): don't initialize %tick-thunk. * the following change doesn't affect the Scheme interface: gc-thunk is called at the end of garbage collection. however it's no longer implemented by pretending it's a signal. * gc.c (scm_gc_end): don't call scm_take_signal. instead mark the system async corresponding to scm_gc_thunk. * async.h: declare scm_gc_async. * async.c (scm_sys_gc_async_thunk): apply the thunk named by gc-thunk directly, instead of going through a signal handler. (scm_gc_async): new variable, points to the GC system-async. (scm_init_async): save the GC async as scm_gc_async instead of using system_signal_asyncs. (scm_gc_vcell): new variable, stores the gc-thunk vcell.
This commit is contained in:
parent
3be7701343
commit
9ea54cc6fa
4 changed files with 58 additions and 27 deletions
|
@ -1,3 +1,24 @@
|
|||
Mon Apr 28 06:10:14 1997 Gary Houston <ghouston@actrix.gen.nz>
|
||||
|
||||
* async.c (scm_sys_tick_async_thunk): commented out. I'm not
|
||||
sure how this was supposed to work.
|
||||
(scm_async_click): don't send SCM_TICK_SIGNAL.
|
||||
(scm_init_async): don't initialize %tick-thunk.
|
||||
|
||||
* the following change doesn't affect the Scheme interface:
|
||||
gc-thunk is called at the end of garbage collection. however it's
|
||||
no longer implemented by pretending it's a signal.
|
||||
|
||||
* gc.c (scm_gc_end): don't call scm_take_signal. instead mark the
|
||||
system async corresponding to scm_gc_thunk.
|
||||
* async.h: declare scm_gc_async.
|
||||
* async.c (scm_sys_gc_async_thunk): apply the thunk named by
|
||||
gc-thunk directly, instead of going through a signal handler.
|
||||
(scm_gc_async): new variable, points to the GC system-async.
|
||||
(scm_init_async): save the GC async as scm_gc_async instead
|
||||
of using system_signal_asyncs.
|
||||
(scm_gc_vcell): new variable, stores the gc-thunk vcell.
|
||||
|
||||
Mon Apr 28 19:14:44 1997 Jim Blandy <jimb@floss.cyclic.com>
|
||||
|
||||
* Makefile.am (libpath.h, cpp_err_symbols.c, cpp_sig_symbols.c):
|
||||
|
|
|
@ -142,7 +142,15 @@ asyncs_pending ()
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
static SCM scm_sys_tick_async_thunk SCM_P ((void));
|
||||
static SCM
|
||||
scm_sys_tick_async_thunk ()
|
||||
{
|
||||
scm_deliver_signal (SCM_TICK_SIGNAL);
|
||||
return SCM_BOOL_F;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
scm_async_click ()
|
||||
|
@ -221,8 +229,10 @@ scm_async_click ()
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (owe_tick)
|
||||
scm_async_mark (system_signal_asyncs[SCM_SIG_ORD(SCM_TICK_SIGNAL)]);
|
||||
*/
|
||||
|
||||
SCM_DEFER_INTS;
|
||||
if (scm_tick_rate && scm_switch_rate)
|
||||
|
@ -564,31 +574,29 @@ scm_sys_alrm_async_thunk ()
|
|||
return SCM_BOOL_F;
|
||||
}
|
||||
|
||||
/* points to the GC system-async, so that scm_gc_end can find it. */
|
||||
SCM scm_gc_async;
|
||||
|
||||
static SCM scm_sys_gc_async_thunk SCM_P ((void));
|
||||
/* the vcell for gc-thunk. */
|
||||
static SCM scm_gc_vcell;
|
||||
|
||||
/* the thunk installed in the GC system-async, which is marked at the
|
||||
end of garbage collection. */
|
||||
static SCM
|
||||
scm_sys_gc_async_thunk ()
|
||||
scm_sys_gc_async_thunk (void)
|
||||
{
|
||||
scm_deliver_signal (SCM_GC_SIGNAL);
|
||||
return SCM_BOOL_F;
|
||||
if (SCM_NFALSEP (scm_gc_vcell))
|
||||
{
|
||||
SCM proc = SCM_CDR (scm_gc_vcell);
|
||||
|
||||
if (SCM_NFALSEP (proc) && !SCM_UNBNDP (proc))
|
||||
scm_apply (proc, SCM_EOL, SCM_EOL);
|
||||
}
|
||||
return SCM_UNSPECIFIED;
|
||||
}
|
||||
|
||||
|
||||
static SCM scm_sys_tick_async_thunk SCM_P ((void));
|
||||
|
||||
static SCM
|
||||
scm_sys_tick_async_thunk ()
|
||||
{
|
||||
scm_deliver_signal (SCM_TICK_SIGNAL);
|
||||
return SCM_BOOL_F;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
SCM
|
||||
scm_take_signal (n)
|
||||
int n;
|
||||
|
@ -636,7 +644,6 @@ scm_mask_signals ()
|
|||
|
||||
|
||||
|
||||
|
||||
void
|
||||
scm_init_async ()
|
||||
{
|
||||
|
@ -660,13 +667,16 @@ scm_init_async ()
|
|||
a_thunk = scm_make_gsubr ("%segv-thunk", 0, 0, 0, scm_sys_segv_async_thunk);
|
||||
system_signal_asyncs[SCM_SIG_ORD(SCM_SEGV_SIGNAL)] = scm_system_async (a_thunk);
|
||||
|
||||
|
||||
scm_gc_vcell = scm_sysintern ("gc-thunk", SCM_BOOL_F);
|
||||
a_thunk = scm_make_gsubr ("%gc-thunk", 0, 0, 0, scm_sys_gc_async_thunk);
|
||||
system_signal_asyncs[SCM_SIG_ORD(SCM_GC_SIGNAL)] = scm_system_async (a_thunk);
|
||||
scm_gc_async = scm_system_async (a_thunk);
|
||||
|
||||
/* Clock and PC driven conditions are given highest priority. */
|
||||
/*
|
||||
a_thunk = scm_make_gsubr ("%tick-thunk", 0, 0, 0, scm_sys_tick_async_thunk);
|
||||
system_signal_asyncs[SCM_SIG_ORD(SCM_TICK_SIGNAL)] = scm_system_async (a_thunk);
|
||||
*/
|
||||
|
||||
a_thunk = scm_make_gsubr ("%alrm-thunk", 0, 0, 0, scm_sys_alrm_async_thunk);
|
||||
system_signal_asyncs[SCM_SIG_ORD(SCM_ALRM_SIGNAL)] = scm_system_async (a_thunk);
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
|
||||
extern unsigned int scm_mask_ints;
|
||||
|
||||
extern SCM scm_gc_async;
|
||||
|
||||
|
||||
extern void scm_async_click SCM_P ((void));
|
||||
|
|
|
@ -377,7 +377,7 @@ scm_gc_end ()
|
|||
{
|
||||
scm_gc_rt = SCM_INUM (scm_get_internal_run_time ()) - scm_gc_rt;
|
||||
scm_gc_time_taken = scm_gc_time_taken + scm_gc_rt;
|
||||
scm_take_signal (SCM_GC_SIGNAL);
|
||||
scm_system_async_mark (scm_gc_async);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue