summaryrefslogtreecommitdiff
path: root/libguile/root.h
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2005-01-24 19:14:54 +0000
committerMarius Vollmer <mvo@zagadka.de>2005-01-24 19:14:54 +0000
commita54a94b39707f47a1f30533bcf7664094d65d073 (patch)
tree69a524a4c3fbb084e1e2fef05da61e1852700909 /libguile/root.h
parentbe1b896c82273d97b79cd839d7281b46e54920f8 (diff)
downloadguile-a54a94b39707f47a1f30533bcf7664094d65d073.tar.gz
Threading changes.
Diffstat (limited to 'libguile/root.h')
-rw-r--r--libguile/root.h9
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)