* __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
[bpt/guile.git] / libguile / ChangeLog
index 13a49bf..907d128 100644 (file)
@@ -1,3 +1,997 @@
+2002-12-15  Mikael Djurfeldt  <djurfeldt@nada.kth.se>
+
+       * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
+       Simply lock a thread C API recursive mutex.
+       (SCM_NONREC_CRITICAL_SECTION_START,
+       SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
+       SCM_REC_CRITICAL_SECTION_END): Removed.
+
+       * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
+       direct calls to scm_rec_mutex_lock / unlock around the three calls
+       to scm_m_expand_body.
+
+       * eval.c, eval.h (promise_free): New function.
+       (scm_force): Rewritten;  Now thread-safe; Removed
+       SCM_DEFER/ALLOW_INTS.
+
+       * pthread-threads.h: Added partially implemented plugin interface
+       for recursive mutexes.  These are, for now, only intended to be
+       used internally within the Guile implementation.
+
+       * pthread-threads.c: New file.
+
+       * threads.c: Conditionally #include "pthread-threads.c".
+
+       * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
+       thread-safe;
+
+       * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
+       SCM_GLOBAL_REC_MUTEX): New macros.
+
+       * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
+       macros---use mutexes instead.
+
+       * tags.h (SCM_IM_FUTURE): New tag.
+
+       * eval.c (scm_m_future): New primitive macro.
+       (SCM_CEVAL): Support futures.
+       (unmemocopy): Support unmemoization of futures.
+
+       * print.c (scm_isymnames): Name of future isym.
+
+       * version.c: Unmade some changes to my private copy that got
+       committed by mistake.
+
+2002-12-11  Mikael Djurfeldt  <mdj@kvast.blakulla.net>
+
+       * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
+       2002-12-10.
+
+       * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
+
+       * gc.c (scm_gc_sweep): Call it here instead, which is a more
+       logical place.
+
+       * threads.c (create_thread): Remember root object until the handle
+       of the new thread is on all_threads list.
+
+       * root.c (scm_make_root): Moved copying of fluids until after
+       creation of root handle so that the fluids are GC protected.  Also
+       removed the critical section.
+
+2002-12-10  Mikael Djurfeldt  <mdj@kvast.blakulla.net>
+
+       * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
+
+       * gc-malloc.c (malloc_mutex): New mutex.
+       (scm_gc_malloc_prehistory): Initialize it.
+       (scm_realloc): Serialize call to realloc
+       (scm_calloc): Same for calloc.
+       Thanks to Wolfgang Jaehrling!
+       (Now we have to make sure all calls to malloc/realloc are made
+       through scm_malloc.)
+
+       * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
+
+       * threads.c (really_launch): Release heap (to prevent deadlock).
+       (create_thread): Release heap before locking thread admin mutex.
+
+2002-12-10  Mikael Djurfeldt  <mdj@kvast.blakulla.net>
+
+       * threads.c (scm_i_thread_invalidate_freelists): New
+       function.
+
+       * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
+
+       * modules.c (scm_export): Inserted a return statement.
+
+2002-12-10  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * modules.c (scm_export): new function
+
+       * gc-card.c: add a note about malloc()/free() overhead.
+
+2002-12-10  Mikael Djurfeldt  <mdj@kvast.blakulla.net>
+
+       * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
+       in srcdir.
+
+2002-12-10  Mikael Djurfeldt  <djurfeldt@nada.kth.se>
+
+       These changes remove scm_ints_disabled (which hasn't has any
+       effect in Guile for quite some time).
+       
+       * async.c, error.h (scm_ints_disabled): Removed.
+
+       * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
+       root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
+       SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
+       (old_ints): Removed.
+
+       * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
+       critical section.
+       (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
+       SCM_ALLOW_INTS.
+
+2002-12-09  Mikael Djurfeldt  <djurfeldt@nada.kth.se>
+
+       * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
+       Removed accidental #if 0 around these functions.
+
+       These changes are the start of support for preemptive
+       multithreading.  Marius and I have agreed that I commit this code
+       into the repository although it isn't thoroughly tested and surely
+       introduces many bugs.  The bugs should only be exposed when using
+       threads, though.  Signalling and error handling for threads is
+       very likely broken.  Work on making the implementation cleaner and
+       more efficient is needed.
+       
+       * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
+       (SCM_NONREC_CRITICAL_SECTION_START,
+       SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
+       SCM_REC_CRITICAL_SECTION_END): New macros.
+       (SCM_CRITICAL_SECTION_START/END): Defined here.
+
+       * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
+       the three calls to scm_m_expand_body.
+
+       * gc.h: #include "libguile/pthread-threads.h";
+       (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
+
+       * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
+       scm_t_key;
+
+       * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
+       access.
+
+       * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
+
+       * gc-freelist.c, threads.c (really_launch): Use
+       SCM_FREELIST_CREATE.
+
+       * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
+
+       * gc.c (scm_i_expensive_validation_check, scm_gc,
+       scm_gc_for_newcell): Put threads to sleep before doing GC-related
+       heap administration so that those pieces of code are executed
+       single-threaded.  We might consider rewriting these code sections
+       in terms of a "call_gc_code_singly_threaded" construct instead of
+       calling the pair of scm_i_thread_put_to_sleep () and
+       scm_i_thread_wake_up ().  Also, we would want to have as many of
+       these sections eleminated.
+
+       * init.c (scm_init_guile_1): Call scm_threads_prehistory.
+
+       * inline.h: #include "libguile/threads.h"
+
+       * pthread-threads.h: Macros now conform more closely to the
+       pthreads interface.  Some of them now take a second argument.
+
+       * threads.c, threads.h: Many changes.
+
+2002-12-09  Mikael Djurfeldt  <djurfeldt@nada.kth.se>
+
+       * Makefile.am (version.h): Changed $^ --> $< in rule for
+       version.h.
+       
+2002-12-08  Rob Browning  <rlb@defaultvalue.org>
+
+       * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
+       (SCM_MINOR_VERSION): use @--@ substitution now.
+       (SCM_MICRO_VERSION): use @--@ substitution now.
+       (scm_effective_version): new function prototype.
+
+       * version.c (scm_effective_version): new function, also add
+       effective-version.
+
+       * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
+       (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
+       SCM_LIBRARY_DIR.
+       (version.h): generate this here rather than configure.in.  This
+       approach tracks source edits better (i.e. more immediately).
+       Might be worth considering for other .in files too.
+
+2002-12-02  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       Reorganized thread package selection.  A thread package now only
+       implements a small set of pthread like functions and Guile
+       implements the rest on top of that.  Guile's implementation is
+       what the "coop-pthreads" package has been previously.  Support for
+       "coop" threads has been removed until I get time to add it again.
+       
+       * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
+       (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
+       null-threads.c, coop-pthreads.c.
+       (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h.  Added
+       pthread-threads.h.
+       
+       * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
+
+       * threads.h: Do not include "libguile/coop-defs.h".  Include
+       "libguile/pthread-threads.h" for USE_COPT_THREADS.  Removed
+       (previously deprecated) C level thread API prototypes.  They are
+       now in the thread package specific headers, "null-threads.h" and
+       "pthread-threads.h".
+       (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
+       New.
+       (scm_threads_init): Removed.
+       (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
+       SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
+       SCM_I_THREAD_SWITCH_COUNT): Define here.
+       (scm_single_thread_p): Removed.
+       (scm_call_with_new_thread): Take two args directly instead of list
+       of two args.
+       (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
+       SCM_SET_THREAD_LOCAL_DATA): Define here.
+
+       * threads.c: Merged with "coop-pthreads.c".
+
+       * null-threads.h: Implement pthread-like API as a set of macros.
+
+       * pthread-threads.h: New, implement pthread-like API by deferring
+       to pthread itself.
+       
+       * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
+       has been lost in the reorganization.
+
+2002-12-01  Mikael Djurfeldt  <mdj@linnaeus>
+
+       The following change makes it possible to move procedure
+       application dispatch outside inner loops.  The motivation was
+       clean implementation of efficient replacements of R5RS primitives
+       in SRFI-1.
+
+       The semantics is clear: scm_trampoline_N returns an optimized
+       version of scm_call_N (or NULL if the procedure isn't applicable
+       on N args).
+
+       Applying the optimization to map and for-each increases efficiency
+       noticeably.  For example, (map abs ls) is 8 times faster than
+       before.
+
+       * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
+
+       * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
+
+       * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
+       (map, for-each): Handle also application on two args as a special
+       case; Use trampolines.
+
+       Other changes:
+       
+       * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
+       (subr2oless): Removed.
+       (scm_restricted_vector_sort_x): Use scm_return_first to keep the
+       vector GC protected.
+
+       * eval.c (check_map_args): Use scm_out_of_range_pos instead of
+       scm_out_of_range.
+
+2002-11-24  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * evalext.[ch] (scm_m_undefine, undefine):  Deprecated.
+
+2002-11-17  Mikael Djurfeldt  <mdj@linnaeus>
+
+       * debug.c (scm_make_iloc): Added missing "return".
+
+2002-11-17  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * strports.c (scm_eval_string_in_module): Validate second arg to
+       be a module.  Thanks to Arno Peters!
+
+2002-11-16  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * .cvsignore: remove goops.c
+
+2002-11-16  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * modules.c (scm_env_top_level, scm_lookup_closure_module,
+       module_variable, scm_module_lookup_closure,
+       scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
+       scm_system_module_env_p):  Don't compare SCM values with C
+       operators == or !=.  Avoid SCM_IMP predicates.  Prefer !SCM_FALSEP
+       over SCM_NFALSEP.
+
+2002-11-16  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * eval.h (SCM_MAKE_ILOC):  New macro.
+
+       * debug.c (scm_make_iloc):  Use SCM_MAKE_ILOC instead of computing
+       the iloc bitpattern here.
+
+2002-11-14  Mikael Djurfeldt  <mdj@linnaeus>
+
+       * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
+       part of the API, otherwise it's difficult to write Guile
+       extensions using non-blocking I/O => moved #include
+       "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
+
+       * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
+       s_unlock_mutex.
+
+2002-11-10  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here.  They
+       are defined in configure.in.
+
+       * threads.c: Removed SCM_API from function definitions.  SCM_API
+       is only for declarations.
+
+2002-11-07  Mikael Djurfeldt  <mdj@linnaeus>
+
+       * coop-pthreads.h: Added support for thread specific data to the
+       generic C API for the coop-pthreads case.
+
+       * threads.c, threads.h (scm_cond_init): Undo unintentional API
+       change.
+       (scm_cond_broadcast): Added missing function.
+
+2002-11-04  Marius Vollmer  <marius.vollmer@uni-dortmund.de>
+
+       * coop.c (coop_next_runnable_thread): Removed, wich should have
+       happened when GUILE_ISELECT was hard-wired.
+
+2002-11-03  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * Makefile.am (libguile_la_SOURCES): Added threads.c
+       (DOT_DOC_FILES): Added threads.doc.
+       (DOT_X_FILES): Added threads.x.
+       (EXTRA_libguile_la_SOURCES): Removed threads.c.
+       (noinst_HEADERS): Added coop-pthreads.c.
+       (modinclude_HEADERS): Added coop-pthreads.h.
+
+       * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
+       SCM_DEBUG_DEPRECATED.  Removed their use thru-out Guile.
+
+       * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
+       Thanks to Bill Schottstaedt!
+
+       * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
+
+       * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
+       SCM_COPT_THREADS is defined.
+       (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
+       is defined.
+       
+       * coop-pthreads.c: Some harmless renamings of internal stuff.
+       (create_thread): New, generalized version of
+       scm_call_with_new_thread.
+       (scm_call_with_new_thread): Use it.
+       (scm_spawn_thread): New, use create_thread.
+       
+2002-11-02  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
+       start testing it now.
+
+       * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
+       defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
+       (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
+       is defined.
+
+2002-10-27  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * scmsigs.c (signal_cell_handlers, install_handler_data,
+       scm_delq_spine_x, really_install_handler, install_handler): New
+       scheme for triggering signal handlers, to simplify take_signal.
+       (take_signal): Simplified, to avoid race conditions.
+       (scm_sigaction_for_thread): Use new Scheme.  Validate that thread
+       hasn't exited yet.
+       
+       * async.c (scm_async_click): Reset pending_asyncs, handle
+       signal_asyncs.  Don't set cdr of a non-signal async to #f.
+       (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
+       always.  Set pending_asyncs.
+       (scm_system_async_mark_for_thread): Check that thread has not
+       exited.
+       (scm_unmask_signals, decrease_block): Call scm_async_click after
+       block_asyncs becomes zero.
+       
+       * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
+       active_asyncs.
+
+       * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
+       fields.
+       * root.c (root_mark): Mark them.
+       (make_root): Initialize them.
+       
+       * iselect.c, iselect.h: Replaced GUILE_ISELECT with
+       USE_COOP_THREADS.
+       (scm_internal_select): Define one version for USE_COOP_THREADS and
+       one for USE_NULL_THREADS.
+       (scm_init_iselect): Likewise.
+       
+        * inline.h (scm_cell, scm_double_cell): Also allow
+       USE_COPT_THREADS to not protect the slot initializers.
+       
+       * init.c (scm_init_guile_1): Call scm_init_thread_procs.  This is
+       because threads need to be initialized before the stack, but
+       gsubrs such as scm_timed_condition_variable_wait can only be
+       created later.
+
+       * threads.h: Include "coop-pthreads.h" when requested.
+       (scm_threads_make_mutex, scm_threads_lock_mutex,
+       scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
+       not implemented anyway.
+       (scm_init_thread_procs, scm_try_mutex,
+       scm_timed_condition_variable_wait,
+       scm_broadcast_condition_variable, scm_c_thread_exited_p,
+       scm_thread_exited_p): New prototypes.
+       (struct timespec): Define if not already defined.
+       (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
+       scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
+       scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
+       scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
+       deprecated.
+
+       * threads.c: Include <errno.h>.  Include "coop-pthreads.c" when
+       requested.
+       (scm_thread_exited_p): New.
+       (scm_try_mutex, scm_broadcast_condition_variable): Newly
+       registered procedures.
+       (scm_wait_condition_variable, scm_timed_wait_condition_variable):
+       Use the latter as the procedure for "wait-condition-variable",
+       thus offering a optional timeout parameter to Scheme.
+       (scm_wait_condition_variable): Implement in terms of
+       scm_timed_wait_condition_variable.
+       (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
+       scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
+       scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
+       scm_cond_broadcast, scm_cond_destroy): Implement in terms of
+       scm_make_mutex, etc, and deprecate.
+       (scm_init_threads): Do not create smobs, leave this to
+       scm_threads_init.  Do not include "threads.x" file.
+       (scm_init_thread_procs): New, include "threads.x" here.
+
+       * null-threads.h (scm_null_mutex, scm_null_mutex_init,
+       scm_null_mutex_lock, scm_null_mutex_unlock,
+       scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
+       scm_null_condvar_wait, scm_null_condvar_signal,
+       scm_null_condvar_destroy): Removed.
+       (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
+       scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
+       scm_cond_destory): Do not define, they are now deprecated and
+       handled by threads.{h,c}.
+       
+       * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
+       (scm_threads_init): Create smobs here, using the appropriate
+       sizes.
+       (block): Removed, now unused.
+       (scm_c_thread_exited_p): New.
+       (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
+       scm_null_mutex_destroy, scm_null_condvar_init,
+       scm_null_condvar_wait, scm_null_condvar_signal,
+       scm_null_condvar_destroy): Removed and updated users to do their
+       task directly.
+       (scm_try_mutex, timeval_subtract,
+       scm_timed_wait_condition_variable,
+       scm_broadcast_condition_variable): New.
+       (scm_wait_condition_variable): Removed.
+
+       * coop-defs.h (coop_m): Added 'level' field.
+       (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
+       scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
+       scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
+       scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
+       define.
+       (coop_condition_variable_broadcast): New.
+
+       * coop-threads.c (scm_threads_init): Create smobs here, using the
+       appropriate sizes.
+       (scm_c_thread_exited_p, scm_try_mutex,
+       scm_timed_wait_condition_variable,
+       scm_broadcast_condition_variable): New.
+       (scm_wait_condition_variable): Removed.
+
+       * coop.c (coop_new_mutex_init): Initialize level.
+       (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
+       level.
+       (coop_condition_variable_signal): Renamed to
+       coop_condition_variable_broadcast and reimplemented in terms of
+       that.  Thus...
+       (coop_condition_variable_broadcast): New.
+
+       * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
+
+       * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
+       
+2002-10-21  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * null-threads.c: Include <time.h>.  Also, use <...> for inclusion
+       of system headers.
+
+       * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
+       New.  Use it instead of SCM_MAKE_VALIDATE in lots of places to
+       give better error messages.  Thanks to Bill Schottstaedt!
+
+2002-10-19  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * evalext.h, evalext.c (scm_definedp, scm_defined_p):  Renamed
+       scm_definedp to scm_defined_p and deprecated scm_definedp.
+
+2002-10-19  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * async.h, async.c (scm_system_async):  Fixed deprecation to work
+       correctly when deprecated features are excluded.
+
+2002-10-16  Marius Vollmer  <marius.vollmer@uni-dortmund.de>
+
+       * async.c (scm_system_async_mark_for_thread): Validate thread
+       argument.
+
+       * coop-threads.c (scm_i_thread_root): Do not validate argument.
+
+       * feature.c (scm_init_feature): Don't add 'threads' for
+       USE_NULL_THREADS.
+
+       * inline.h (scm_cell, scm_double_cell): Also allow
+       USE_NULL_THREADS to not protect the slot initializers.
+
+       * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
+       "USE_THREAD".
+
+       * Makefile.am (noinst_HEADERS): Added null-threads.c.
+       (modinclude_HEADERS): Added null-threads.h.
+
+       * threads.h: Include null-threads.h when !USE_COOP_THREADS.
+       * threads.c: Include null-threads.c when !USE_COOP_THREADS.
+       (scm_init_threads): Use generic type names scm_t_mutex and
+       scm_t_cond instead of coop_m and coop_c.
+
+       * null-threads.c, null-threads.h: New files.
+
+2002-10-15  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * Makefile.am: Replaced "$<" in non-pattern rules with its value.
+       This is to support makes that know about "$<" only in pattern
+       rules, like Sun's make.
+
+2002-10-13  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
+       substitution.  Thanks to David Allouche!
+
+2002-10-13  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * evalext.h:  Replaced SCM_DEBUG_DEPRECATED with
+       !SCM_ENABLE_DEPRECATED.
+
+2002-10-11  Marius Vollmer  <marius.vollmer@uni-dortmund.de>
+
+       * async.c (scm_system_async_mark_for_thread): Only call
+       scm_i_thread_root when USE_THREADS is defined.  Use scm_root
+       otherwise.
+
+       * scmsigs.c (take_signal): Only call scm_i_thread_root when
+       USE_THREADS is defined.  Use scm_root otherwise.
+       (scm_sigaction_for_thread): Ignore THREAD argument when
+       USE_THREADS is not defined.  Also, move THREAD argument defaulting
+       out of HAVE_SIGACTION section, which was a bug.
+
+2002-10-10  Marius Vollmer  <marius.vollmer@uni-dortmund.de>
+
+       * scmsigs.c (scm_sigaction_for_thread): Store original handler in
+       signal_handlers, not the closure that is used as the async.
+       The closure is stored in signal_handler_cells, as previously.
+       
+2002-10-10  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * root.h (scm_root_state): Added 'block_async' slot.
+       (scm_active_asyncs): Removed abbrev.
+       * root.c (scm_make_root): Initialize 'block_asyncs' slot.
+
+       * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
+       abbrev.
+
+       * async.h (scm_call_with_blocked_asyncs,
+       scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
+       scm_c_call_with_unblocked_asyncs): New prototypes.
+       (scm_mask_signals, scm_unmask_signals): Deprecated.
+       (scm_mask_ints): Turned into a macro.
+       * async.c (scm_mask_ints): Removed.
+       (scm_run_asyncs): Do not set scm_mask_ints while running an async.
+       this should not be necessary.
+       (scm_async_click): Test block_asyncs instead of scm_mask_ints.
+       (scm_mask_signals, scm_unmask_signals): Deprecated.  Emit
+       deprecation warning and check for errornous use.  Set block_asyncs
+       instead of scm_mask_ints.
+       (increase_block, decrease_block, scm_call_with_blocked_asyncs,
+       scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
+       scm_c_call_with_unblocked_asyncs): New.
+       
+       * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
+       Asyncs are enabled by default.
+
+2002-10-09  Neil Jerram  <neil@ossau.uklinux.net>
+
+       * vports.c (scm_make_soft_port): Allow vector argument to carry a
+       6th element: an input waiting thunk.
+       (sf_input_waiting): New.
+
+2002-10-05  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * root.c (root_mark): Mark active_asyncs slot.
+
+       * async.c (scm_async_click): Set the cdr of a executed handler
+       cell to SCM_BOOL_F, not SCM_EOL.
+       (scm_i_queue_async_cell): Queue the cell at the end of the list,
+       and only if the handler procedure is not already present.
+       (scm_system_async_mark_for_thread): Initialize cdr of handler cell
+       with SCM_BOOL_F.
+       * scmsigs.c (scm_sigaction_for_thread): Likewise.
+       
+2002-10-04  Rob Browning  <rlb@defaultvalue.org>
+
+       * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
+
+       * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
+       scm_lt_dlopenext, and scm_lt_dlerror.
+       (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
+       and scm_lt_dlerror.
+       (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
+       and scm_lt_dlerror.
+       (sysdep_dynl_init): switch to scm_lt_dlinit();
+
+       * Makefile.am (libguile_la_LIBADD): switch to use
+       libguile-ltdl.la.
+
+       * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
+
+2002-10-04  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * scmsigs.h (scm_sigaction_for_thread): New prototype.
+       * scmsigs.c (got_signal): Removed.
+       (signal_handler_cells, signal_handler_threads): New.
+       (take_signal): Queue the cell of the signal for the specified
+       thread.  Reset the signal handler on systems that don't have
+       sigaction.
+       (sys_deliver_signals): Removed.
+       (close_1): New.
+       (scm_sigaction_for_thread): Renamed from scm_sigaction and
+       extended to also set the thread of a signal and allocate a cell
+       for it.  Keep the Scheme name "sigaction".  Check that signum is
+       within range.  Also, use SCM_VECTOR_REF instead of SCM_VELTS.
+       (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
+       (scm_init_scmsigs): Allocate signal_handler_cells and
+       signal_handler_threads vectors.
+
+       * async.c: Removed GUILE_OLD_ASYNC_CLICK code.  Reorganized so
+       that system asnycs and user asyncs are separated.  Reimplemented
+       system asyncs to work per-thread.
+
+       * gc.c (scm_init_gc): Do not use scm_system_async.
+
+       * async.h (scm_asyncs_pending, scm_set_tick_rate,
+       scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
+       Removed prototypes.
+       (scm_i_queue_async_cell): New.
+       
+       * __scm.h (scm_asyncs_pending_p): Removed.
+       (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
+       scm_asyncs_pending_p.
+
+       * async.h (scm_system_async_mark_for_thread): New prototype.
+
+       * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
+
+       * root.h (scm_root_state): Added new "active_asyncs" slot.
+       * root.c (scm_make_root): Initialize it to SCM_EOL.
+
+       * coop-defs.h (coop_t): Added new "handle" slot.
+       * coop-threads.c (all_threads, scm_current_thread,
+       scm_all_threads, scm_i_thread_root): New.
+       (scm_threads_init): Add main thread to all_threads.
+       (scheme_launch_thread): Remove thread from all_threads when it
+       terminates.
+       (scm_call_with_new_thread): Initialize handle slot of coop_t
+       structure and add new thread to all_threads.
+       (scm_spawn_thread): Likewise.
+
+       * threads.h (scm_current_thread, scm_all_threads): New prototypes.
+       * threads.c (scm_current_thread, scm_all_threads): Register as
+       primitives.
+
+       * dynl.c: Use scm_lt_ prefix for libltdl functions.
+
+2002-09-29  Neil Jerram  <neil@ossau.uklinux.net>
+
+       * script.c (scm_compile_shell_switches): Fix bad spelling of
+       `explicitly' in comment.
+
+2002-09-28  Neil Jerram  <neil@ossau.uklinux.net>
+
+       * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
+       Refer to provided? in doc string rather than deprecated feature?.
+
+2002-09-24  Gary Houston  <ghouston@arglist.com>
+
+       * inline.h (scm_double_cell): prevent reordering of statements
+       with any following code (for GCC 3 strict-aliasing).
+       * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
+       the earlier version of the reordering prevention.
+
+2002-09-19  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * inline.h (scm_double_cell): move SET_GCMARK set out of if body. 
+
+2002-09-09  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
+       protection.
+
+2002-09-08  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * inline.h: include stdio.h
+
+       * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
+
+2002-09-05  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * gc-segment.c (scm_i_make_initial_segment): check user settings
+       for sanity.
+
+       * gc-malloc.c (scm_gc_init_malloc): check user settings for
+       sanity.
+
+       * gc-freelist.c (scm_init_freelist): check user settings for sanity. 
+
+       * struct.h: change scm_structs_to_free to scm_i_structs_to_free
+
+       * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
+       these won't ever wrap around with high memory usage. Thanks to
+       Sven Hartrumpf for finding this.
+
+       * gc-freelist.c: include <stdio.h>
+
+       * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
+
+2002-09-01  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * vectors.h (SCM_VECTOR_REF): New.
+
+       * snarf.h (SCM_DEFINE_PUBLIC): New.
+
+2002-08-30  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * socket.c (scm_addr_vector): Added size of address to arguments.
+       Use it to avoid accessing a non-existent path in a sockaddr_un.
+       Changed all callers.
+
+2002-08-29  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * gc.h: remove DOUBLECELL card flags.
+
+       * gc-malloc.c (scm_calloc): try to use calloc() before calling
+       scm_realloc().
+
+       * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
+       init loop; handle this from scm_init_card_freelist()
+
+       * gc-card.c (scm_init_card_freelist): init bit vector here.
+
+       * numbers.c (scm_make_real): prevent reordering of statements
+       num2float.i.c (FLOAT2NUM): idem
+
+2002-08-27  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * eval.h: prepend libguile/ to include path
+
+2002-08-26  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * script.c (scm_compile_shell_switches): Added "2002" to Copyright
+       years.  Thanks to Martin Grabmüller!
+
+2002-08-25  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
+       unsigned numbers for computing minimum heap increment. This
+       prevents weird results when a a negative minimum increment is
+       computed.
+
+2002-08-24  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * gc_os_dep.c: When we have __libc_stack_end, use that directly
+       instead of the old tricks.
+
+       * guile-snarf.in: Do not expect the input file to be the first
+       argument after the optional "-o" option, just pass everything to
+       the pre-processor without extracting the input file name.
+
+2002-08-23  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
+       length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.  
+
+2002-08-22  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
+       Bill Schottstaedt for the bug report
+
+2002-08-20  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * print.c (scm_iprin1): Print primitives generics always as
+       "primitive-generic" even when they have no primitive methods yet.
+
+2002-08-17  Gary Houston  <ghouston@arglist.com>
+
+       * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
+       call.
+
+2002-08-17  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * ports.c (scm_add_to_port_table): small bugfix.
+
+       * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
+       malloc.
+
+       * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
+       only use SCM_MIN_HEAP_SEG_SIZE.
+
+       * ports.c (scm_add_to_port_table): add backwards compatibility
+       function
+
+       * ports.h: use scm_i_ prefix for port table and port table size.
+       
+2002-08-15  Mikael Djurfeldt  <mdj@linnaeus>
+
+       * vports.c (scm_make_soft_port): Initialize pt variable.
+
+2002-08-13  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * strports.h (scm_c_eval_string_in_module,
+       scm_eval_string_in_module): New prototypes.
+       * strports.c (scm_eval_string_in_module): New, but use
+       "eval-string" as the Scheme name and make second parameter
+       optional.
+       (scm_eval_string): Implement using scm_eval_string_in_module.
+       (scm_c_eval_string_in_module): New.
+       Thanks to Ralf Mattes for the suggestion!
+       
+2002-08-09  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
+       message and abort.
+       
+       * gc-mark.c ("scm_gc_mark_dependencies"): idem.
+
+       * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
+       stead of scm_t_port*. The function now takes a tag argument.
+
+2002-08-08  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * gc.h: add scm_debug_cells_gc_interval to public interface
+
+       * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
+
+       * gc.c (scm_i_expensive_validation_check): separate expensive
+       validation checks from cheap ones.
+
+2002-08-06  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * read.c (scm_input_error): new function: give meaningful error
+       messages, and throw read-error
+
+       * gc-malloc.c (scm_calloc): add scm_calloc.
+
+2002-08-05  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * tags.h: remove GC bits documentation from the tags table. 
+
+       * read.c (INPUT_ERROR): Prepare for file:line:column error
+       messages for errors in scm_lreadr() and friends.
+
+2002-08-04  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
+       implementation). 
+       (scm_gc_calloc): new function
+
+2002-08-04  Han-Wen  <hanwen@cs.uu.nl>
+
+       * ports.c (scm_new_port_table_entry): init port entry to 0
+       completely.
+       
+       * ports.c (scm_new_port_table_entry): change function from
+       scm_add_to_port_table. This prevents cells with null-pointers from
+       being exposed to GC.
+
+       * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
+       fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
+
+       * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
+       to gc-stats.
+
+       * numbers.c (big2str): return "0" for 0 iso. ""
+
+        * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
+       private-gc.h: new file
+
+        * gc.c: completely revised and cleaned up the GC. It now uses lazy
+        sweeping. More documentation in workbook/newgc.text
+
+2002-07-25  Marius Vollmer  <marius.vollmer@uni-dortmund.de>
+
+       * random.c (rstate_free): Return zero.
+
+2002-07-24  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * environments.c (remove_key_from_alist):  Removed.
+
+       (obarray_remove):  Simplified.
+
+2002-07-24  Stefan Jahn  <stefan@lkcc.org>
+
+       * continuations.h: ia64: Include <signal.h> before 
+       <sys/ucontext.h>.
+
+2002-07-21  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * modules.c (scm_sym2var):  Don't compare SCM values with ==.
+
+2002-07-21  Han-Wen  <hanwen@cs.uu.nl>
+
+       * goops.c (scm_compute_applicable_methods): use
+       scm_remember_upto_here_1 iso scm_remember_upto_here
+
+       * macros.c: include deprecation.h
+
+       * vectors.c (scm_vector_move_right_x): remove side effect in
+       macro arg.
+       (scm_vector_move_left_x): idem.
+
+       * net_db.c, posix.c, socket.c: variable naming: change ans to
+       result.
+
+       * sort.c (scm_merge_vector_x): accept vector as argument
+       iso. SCM*. This is needed for full GC correctness.
+
+       * gc.h: undo previous undocumented changes related to #ifdef
+       GENGC.
+
+2002-07-20  Han-Wen  <hanwen@cs.uu.nl>
+
+       * *.c: add space after commas everywhere.
+
+       * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
+       Document cases where SCM_WRITABLE_VELTS() is used.
+       
+       * vectors.h (SCM_VELTS): prepare for write barrier, and let
+       SCM_VELTS() return a const pointer
+       (SCM_VECTOR_SET): add macro.
+
+2002-07-15  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
+       scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
+       Deprecated the special kind of built-in dynamic syntax transformer
+       that was inaccurately named "macro".  Note:  The built-in syntax
+       transformers that are named "mmacro" or "memoizing-macro" still
+       exist, and it is these which come much closer to what one would
+       call a macro.
+
+2002-07-13  Neil Jerram  <neil@ossau.uklinux.net>
+
+       * eval.c (unmemocopy): Fix for
+       1001-local-eval-error-backtrace-segfaults (unmemoization crash
+       with internal definitions and local-eval).
+
+2002-07-12  Gary Houston  <ghouston@arglist.com>
+
+       * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
+       defined.  They don't do anything useful, especially since the
+       only case where DYNAMIC_LINKING is undefined seems to be
+       when --with-modules=no is given to configure, which is basically
+       requesting that the "dynamic linking module" be omitted.
+
+       * Makefile.am (libguile_la_SOURCES): move dynl.c from
+       libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
+
+       * extensions.c (load_extension): check DYNAMIC_LINKING for
+       scm_dynamic_call.
+       * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
+       scm_init_dynamic_linking.
+
 2002-07-10  Marius Vollmer  <mvo@zagadka.ping.de>
 
        * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
 
        * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
        * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
-       (s_scm_slot_exists_p): Rename from s_scm_slots_exists_p.
+       (scm_slot_exists_p): Rename from scm_slots_exists_p.
        Thanks to Andreas Rottmann.
 
 2002-04-20  Gary Houston  <ghouston@arglist.com>
        * socket.c: Include `stdint.h' if available for the `uint32_t'
        declaration.
 
-       * scmsigs.c (s_scm_sigaction): Initialize `chandler' (inhibits
+       * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
        compiler warning).
 
        * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.