diff options
author | Rob Browning <rlb@defaultvalue.org> | 2001-10-09 03:33:16 +0000 |
---|---|---|
committer | Rob Browning <rlb@defaultvalue.org> | 2001-10-09 03:33:16 +0000 |
commit | d9189652722d4deec57d74e001ccdaab8ddfa394 (patch) | |
tree | 7a356e5bb84204aeec235872d9b6e1389da68883 /libguile | |
parent | 766c5eaf49da2d1fd1027870a62cb4c3b5ea2f41 (diff) | |
download | guile-d9189652722d4deec57d74e001ccdaab8ddfa394.tar.gz |
* gc.c: support ia64 register backing store.
(SCM_MARK_BACKING_STORE): new macro.
Diffstat (limited to 'libguile')
-rw-r--r-- | libguile/gc.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libguile/gc.c b/libguile/gc.c index 3a2aeba22..4808625cf 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -52,6 +52,11 @@ #include <errno.h> #include <string.h> +#ifdef __ia64__ +#include <ucontext.h> +extern unsigned long __libc_ia64_register_backing_store_base; +#endif + #include "libguile/_scm.h" #include "libguile/eval.h" #include "libguile/stime.h" @@ -1029,6 +1034,20 @@ scm_t_c_hook scm_before_sweep_c_hook; scm_t_c_hook scm_after_sweep_c_hook; scm_t_c_hook scm_after_gc_c_hook; +#ifdef __ia64__ +# define SCM_MARK_BACKING_STORE() do { \ + ucontext_t ctx; \ + SCM_STACKITEM * top, * bot; \ + getcontext (&ctx); \ + scm_mark_locations ((SCM_STACKITEM *) &ctx.uc_mcontext, \ + ((size_t) (sizeof (SCM_STACKITEM) - 1 + sizeof ctx.uc_mcontext) \ + / sizeof (SCM_STACKITEM))); \ + bot = (SCM_STACKITEM *) __libc_ia64_register_backing_store_base; \ + top = (SCM_STACKITEM *) ctx.uc_mcontext.sc_ar_bsp; \ + scm_mark_locations (bot, top - bot); } while (0) +#else +# define SCM_MARK_BACKING_STORE() +#endif void scm_igc (const char *what) @@ -1084,6 +1103,7 @@ scm_igc (const char *what) scm_mark_locations (scm_stack_base - stack_len, stack_len); #endif } + SCM_MARK_BACKING_STORE(); #else /* USE_THREADS */ |