This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

taking over main?



I'm just briefly looking at the way GUILE boots, and why it takes over
main. If I understand correctly, the real problem is not initializing
the GC. That simply amounts to exporting start_stack (), but rather
how to handle some types of exceptions, right? 

I am seeing

  setjmp_val = setjmp (SCM_JMPBUF (scm_rootcont));
  if (!setjmp_val)
    {
      scm_set_program_arguments (closure->argc, closure->argv, 0);
      scm_internal_lazy_catch (SCM_BOOL_T, invoke_main_func, closure,
			       scm_handle_by_message, 0);
    }

which I read as: remember this spot, and execute main_func().  In
other words, there is some way to jump towards this code:

  scm_restore_signals ();

  /* This tick gives any pending
   * asyncs a chance to run.  This must be done after
   * the call to scm_restore_signals.
   */
  SCM_ASYNC_TICK;

Why is this here? When is this invoked?  

-- 

Han-Wen Nienhuys   |   hanwen@cs.uu.nl    | http://www.cs.uu.nl/~hanwen/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]