diff options
Diffstat (limited to 'libguile/root.h')
-rw-r--r-- | libguile/root.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libguile/root.h b/libguile/root.h index a97cf7536..f33278ac9 100644 --- a/libguile/root.h +++ b/libguile/root.h @@ -64,8 +64,7 @@ typedef struct scm_root_state /* It is very inefficient to have this variable in the root state. */ scm_t_debug_frame *last_debug_frame; - SCM progargs; /* vestigial */ - SCM exitval; /* vestigial */ + SCM progargs; SCM cur_inp; SCM cur_outp; @@ -87,6 +86,10 @@ typedef struct scm_root_state */ } scm_root_state; +#define scm_root ((scm_root_state *) pthread_getspecific (scm_i_root_key)) +#define scm_set_root(new_root) pthread_setspecific (scm_i_root_key, new_root) +SCM_API pthread_key_t scm_i_root_key; + #define scm_stack_base (scm_root->stack_base) #define scm_save_regs_gc_mark (scm_root->save_regs_gc_mark) #define scm_errjmp_bad (scm_root->errjmp_bad) @@ -101,8 +104,6 @@ typedef struct scm_root_state #define scm_cur_errp (scm_root->cur_errp) #define scm_cur_loadp (scm_root->cur_loadp) -#define scm_root ((scm_root_state *) SCM_THREAD_LOCAL_DATA) -#define scm_set_root(new_root) SCM_SET_THREAD_LOCAL_DATA (new_root) |