* threads.scm (letpar): New macro.
[bpt/guile.git] / libguile / root.c
index f26843e..041875a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,1998,1999,2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,1999,2000, 2001, 2002 Free Software Foundation, Inc.
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -60,10 +60,6 @@ SCM scm_sys_protects[SCM_NUM_PROTECTS];
 
 scm_t_bits scm_tc16_root;
 
-#ifndef USE_THREADS
-struct scm_root_state *scm_root;
-#endif
-
 \f
 
 static SCM
@@ -78,11 +74,10 @@ root_mark (SCM root)
   scm_gc_mark (s->cur_inp);
   scm_gc_mark (s->cur_outp);
   scm_gc_mark (s->cur_errp);
-  scm_gc_mark (s->def_inp);
-  scm_gc_mark (s->def_outp);
-  scm_gc_mark (s->def_errp);
   /* No need to gc mark def_loadp */
   scm_gc_mark (s->fluids);
+  scm_gc_mark (s->active_asyncs);
+  scm_gc_mark (s->signal_asyncs);
   return SCM_ROOT_STATE (root) -> parent;
 }
 
@@ -125,15 +120,18 @@ scm_make_root (SCM parent)
        = root_state->cur_inp
        = root_state->cur_outp
        = root_state->cur_errp
-       = root_state->def_inp
-       = root_state->def_outp
-       = root_state->def_errp
        = root_state->cur_loadp
        = root_state->fluids
        = root_state->handle
        = root_state->parent
        = SCM_BOOL_F;
     }
+  
+  root_state->active_asyncs = SCM_EOL;
+  root_state->signal_asyncs = SCM_EOL;
+  root_state->block_asyncs = 0;
+  root_state->pending_asyncs = 1;
+
   SCM_REDEFER_INTS;
   SCM_NEWSMOB (root, scm_tc16_root, root_state);
   root_state->handle = root;