+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):
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 ()
}
}
- if (owe_tick)
- scm_async_mark (system_signal_asyncs[SCM_SIG_ORD(SCM_TICK_SIGNAL)]);
+ /*
+ 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)
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;
-}
-
-
-static SCM scm_sys_tick_async_thunk SCM_P ((void));
+ if (SCM_NFALSEP (scm_gc_vcell))
+ {
+ SCM proc = SCM_CDR (scm_gc_vcell);
-static SCM
-scm_sys_tick_async_thunk ()
-{
- scm_deliver_signal (SCM_TICK_SIGNAL);
- return SCM_BOOL_F;
+ if (SCM_NFALSEP (proc) && !SCM_UNBNDP (proc))
+ scm_apply (proc, SCM_EOL, SCM_EOL);
+ }
+ return SCM_UNSPECIFIED;
}
-
-
\f
-
SCM
scm_take_signal (n)
int n;
\f
-
void
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 ("%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);