bpt/guile.git
21 years agoAdd a hook that is run whenever a new module is defined.
Neil Jerram [Sat, 28 Dec 2002 20:14:21 +0000 (20:14 +0000)]
Add a hook that is run whenever a new module is defined.

21 years agoRemove superfluous code (previously commented out).
Neil Jerram [Sat, 28 Dec 2002 20:10:49 +0000 (20:10 +0000)]
Remove superfluous code (previously commented out).

21 years agoCode (work in progress, currently disabled) for reading Elisp-syntax vectors.
Neil Jerram [Sat, 28 Dec 2002 19:57:14 +0000 (19:57 +0000)]
Code (work in progress, currently disabled) for reading Elisp-syntax vectors.

21 years agoNew stub definitions for char-table primitives.
Neil Jerram [Sat, 28 Dec 2002 19:22:11 +0000 (19:22 +0000)]
New stub definitions for char-table primitives.

21 years ago*** empty log message ***
Marius Vollmer [Thu, 26 Dec 2002 15:00:50 +0000 (15:00 +0000)]
*** empty log message ***

21 years ago(c-tokenize.o): Refer to source via $< so that vpath
Marius Vollmer [Thu, 26 Dec 2002 15:00:23 +0000 (15:00 +0000)]
(c-tokenize.o): Refer to source via $< so that vpath
builds work.
(EXTRA_DIST): Added version.h.in.

21 years ago* gc.c, gc.h (scm_i_sweep_mutex): New mutex.
Mikael Djurfeldt [Sat, 21 Dec 2002 18:59:47 +0000 (18:59 +0000)]
* gc.c, gc.h (scm_i_sweep_mutex): New mutex.

* gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
scm_gc_register_collectable_memory): Substitute locking of
scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
(scm_igc): Lock sweep mutex here instead of in callers; Calls to
scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
the single-thread section (which now only contains the mark
phase).
(scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
Removed SCM_DEFER/ALLOW_INTS.  Simply call scm_igc directly.

* threads.c (gc_section_mutex): Removed.

21 years ago* threads.c (create_thread): Clear parent field in root state in
Mikael Djurfeldt [Thu, 19 Dec 2002 08:08:39 +0000 (08:08 +0000)]
* threads.c (create_thread): Clear parent field in root state in
order not to unnecessarily remember dead threads.

21 years agoAdded back two macros used when debugging. (Got lost by mistake during
Mikael Djurfeldt [Thu, 19 Dec 2002 08:00:23 +0000 (08:00 +0000)]
Added back two macros used when debugging. (Got lost by mistake during
a recent change.)

21 years ago* eval.c (call_subr2o_1, call_lsubr2_2): New functions.
Mikael Djurfeldt [Thu, 19 Dec 2002 07:49:15 +0000 (07:49 +0000)]
* eval.c (call_subr2o_1, call_lsubr2_2): New functions.
(scm_trampoline_1, scm_trampoline_2): Use them.

21 years agoFix
Mikael Djurfeldt [Wed, 18 Dec 2002 14:15:11 +0000 (14:15 +0000)]
Fix

21 years ago* Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
Mikael Djurfeldt [Wed, 18 Dec 2002 13:42:58 +0000 (13:42 +0000)]
* Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
(EXTRA_DIST): Added threads-plugin.c.

* threads-plugin.h, threads-plugin.c: New files.

* threads.h: #include "libguile/threads-plugin.h".

* threads.c: #include "libguile/threads-plugin.c".

* pthread-threads.c: Temporarily remove debugging functions.

* threads.c, threads.h (scm_yield): Added back.

21 years ago* threads.scm: Removed bogus definition of future-ref.
Mikael Djurfeldt [Wed, 18 Dec 2002 11:00:56 +0000 (11:00 +0000)]
* threads.scm: Removed bogus definition of future-ref.

21 years ago* threads.c (really_launch): Detach before unlocking
Mikael Djurfeldt [Wed, 18 Dec 2002 10:53:23 +0000 (10:53 +0000)]
* threads.c (really_launch): Detach before unlocking
thread_admin_mutex in order not to risk being joined.
(scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
thread_admin_mutex locked during GC.

* pthread-threads.c, pthread-threads.h: Improvements to debugging
functions.

21 years agoFix...
Mikael Djurfeldt [Mon, 16 Dec 2002 21:02:37 +0000 (21:02 +0000)]
Fix...

21 years ago* pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
Mikael Djurfeldt [Mon, 16 Dec 2002 20:29:18 +0000 (20:29 +0000)]
* pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
support for debugging mutex operations.

21 years ago* threads.c (scm_thread): Removed filed joining_threads.
Mikael Djurfeldt [Mon, 16 Dec 2002 15:24:13 +0000 (15:24 +0000)]
* threads.c (scm_thread): Removed filed joining_threads.
(thread_print): Print thread number as well as address of thread
structure.
(scm_join_thread): Bugfix.
(scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
scm_timed_wait_condition_variable, scm_signal_condition_variable,
scm_broadcast_condition_variable): Use the low-level API.
(scm_all_threads): Return copy of thread list (to prevent
unintended destruction).
(scm_threads_prehistory): Initialize heap_mutex of fake thread.

21 years ago* threads.c (scm_thread): Removed filed joining_threads.
Mikael Djurfeldt [Mon, 16 Dec 2002 10:33:49 +0000 (10:33 +0000)]
* threads.c (scm_thread): Removed filed joining_threads.
(thread_print): Print thread number as well as address of thread
structure.

21 years ago* pthread-threads.c, pthread-threads.h, threads.c: Fixes to
Mikael Djurfeldt [Mon, 16 Dec 2002 09:50:21 +0000 (09:50 +0000)]
* pthread-threads.c, pthread-threads.h, threads.c: Fixes to
pthread "native" recursive mutex support.

21 years ago* pthread-threads.c, pthread-threads.h, threads.c: Fixes to
Mikael Djurfeldt [Mon, 16 Dec 2002 09:28:38 +0000 (09:28 +0000)]
* pthread-threads.c, pthread-threads.h, threads.c: Fixes to
pthread "native" recursive mutex support.

21 years ago* configure.in: Test if pthread.h declares
Mikael Djurfeldt [Mon, 16 Dec 2002 09:25:48 +0000 (09:25 +0000)]
* configure.in: Test if pthread.h declares
pthread_mutexattr_settype ().

21 years ago* threads.scm (par-map, par-for-each): Reimplemented using
Mikael Djurfeldt [Sun, 15 Dec 2002 14:36:19 +0000 (14:36 +0000)]
* threads.scm (par-map, par-for-each): Reimplemented using
joing-thread.
(parallel): Reimplemented using futures.
(n-par-map, n-for-each): New procedures.

21 years ago* __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
Mikael Djurfeldt [Sun, 15 Dec 2002 14:24:34 +0000 (14:24 +0000)]
* __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.

21 years ago* version.c: Unmade some changes to my private copy that got
Mikael Djurfeldt [Sun, 15 Dec 2002 11:27:01 +0000 (11:27 +0000)]
* version.c: Unmade some changes to my private copy that got
committed by mistake.

21 years ago*** empty log message ***
Marius Vollmer [Thu, 12 Dec 2002 20:45:38 +0000 (20:45 +0000)]
*** empty log message ***

21 years ago(improper-list-copy): New.
Marius Vollmer [Thu, 12 Dec 2002 20:43:11 +0000 (20:43 +0000)]
(improper-list-copy): New.
(parse-arglist): Use it instead of list-copy.

21 years ago* gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
Mikael Djurfeldt [Wed, 11 Dec 2002 08:35:22 +0000 (08:35 +0000)]
* gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
2002-12-10.

21 years ago* gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
Mikael Djurfeldt [Wed, 11 Dec 2002 06:54:59 +0000 (06:54 +0000)]
* 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.

21 years ago* gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
Mikael Djurfeldt [Tue, 10 Dec 2002 20:25:26 +0000 (20:25 +0000)]
* 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.

21 years ago* gc-malloc.c (malloc_mutex): New mutex.
Mikael Djurfeldt [Tue, 10 Dec 2002 20:09:45 +0000 (20:09 +0000)]
* gc-malloc.c (malloc_mutex): New mutex.
(scm_gc_init_malloc): 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.)

21 years agoRemoved incorrect comment.
Mikael Djurfeldt [Tue, 10 Dec 2002 18:23:38 +0000 (18:23 +0000)]
Removed incorrect comment.

21 years ago* configure.in (_THREAD_SAFE): Define when pthreads are enabled in
Mikael Djurfeldt [Tue, 10 Dec 2002 17:54:01 +0000 (17:54 +0000)]
* configure.in (_THREAD_SAFE): Define when pthreads are enabled in
order to get thread safe versions of glibc functions.

21 years ago(create_thread): Release heap before locking thread admin mutex.
Mikael Djurfeldt [Tue, 10 Dec 2002 17:27:31 +0000 (17:27 +0000)]
(create_thread): Release heap before locking thread admin mutex.

21 years ago* threads.c (really_launch): Release heap (to prevent deadlock).
Mikael Djurfeldt [Tue, 10 Dec 2002 16:51:14 +0000 (16:51 +0000)]
* threads.c (really_launch): Release heap (to prevent deadlock).
(create_thread): Release heap before locking thread admin mutex.

21 years ago* threads.c (scm_i_thread_invalidate_freelists): New
Mikael Djurfeldt [Tue, 10 Dec 2002 16:09:37 +0000 (16:09 +0000)]
* threads.c (scm_i_thread_invalidate_freelists): New
function.

* gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.

21 years ago* modules.c (scm_export): Inserted a return statement.
Mikael Djurfeldt [Tue, 10 Dec 2002 16:07:30 +0000 (16:07 +0000)]
* modules.c (scm_export): Inserted a return statement.

21 years ago* modules.c (scm_export): new function
Han-Wen Nienhuys [Tue, 10 Dec 2002 13:26:25 +0000 (13:26 +0000)]
* modules.c (scm_export): new function

* gc-card.c: add a note about malloc()/free() overhead.

21 years ago* Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
Mikael Djurfeldt [Tue, 10 Dec 2002 10:31:44 +0000 (10:31 +0000)]
* Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
in srcdir.

21 years ago* async.c, error.h (scm_ints_disabled): Removed.
Mikael Djurfeldt [Tue, 10 Dec 2002 09:35:06 +0000 (09:35 +0000)]
* 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.

21 years ago*** empty log message ***
Mikael Djurfeldt [Tue, 10 Dec 2002 08:54:48 +0000 (08:54 +0000)]
*** empty log message ***

21 years ago* threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
Mikael Djurfeldt [Mon, 9 Dec 2002 19:27:44 +0000 (19:27 +0000)]
* threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
Removed accidental #if 0 around these functions.

21 years ago* __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
Mikael Djurfeldt [Mon, 9 Dec 2002 13:42:58 +0000 (13:42 +0000)]
* __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.

* configure.in: Temporarily replaced "copt" threads option with new
option "pthreads".
(USE_PTHREAD_THREADS): Define if pthreads configured.

21 years ago* threads.scm (letpar): New macro.
Mikael Djurfeldt [Mon, 9 Dec 2002 12:58:52 +0000 (12:58 +0000)]
* threads.scm (letpar): New macro.

21 years ago* configure.in (GUILE_EFFECTIVE_VERSION): AC_SUBST it.
Rob Browning [Mon, 9 Dec 2002 00:52:03 +0000 (00:52 +0000)]
* configure.in (GUILE_EFFECTIVE_VERSION): AC_SUBST it.
(AC_CONFIG_FILES): separate out the files that need to be chmodded
at the end of config.status.  Our "default" approach using
AC_CONFIG_COMMANDS quit working (and would have needed to be
changed to AC_CONFIG_COMMANDS(,,CMDS) rather than our previous
AC_CONFIG_COMMANDS(default,CMDS), but I the new approach, using
per-file AC_CONFIG_FILES calls appears to be more "correct" in the
current autoconf docs.

21 years ago*** empty log message ***
Rob Browning [Mon, 9 Dec 2002 00:51:53 +0000 (00:51 +0000)]
*** empty log message ***

21 years ago* GUILE-VERSION (GUILE_EFFECTIVE_VERSION): new variable.
Rob Browning [Mon, 9 Dec 2002 00:51:10 +0000 (00:51 +0000)]
* GUILE-VERSION (GUILE_EFFECTIVE_VERSION): new variable.

21 years ago* debugger/breakpoints/Makefile.am (subpkgdatadir): VERSION ->
Rob Browning [Mon, 9 Dec 2002 00:50:34 +0000 (00:50 +0000)]
* debugger/breakpoints/Makefile.am (subpkgdatadir): VERSION ->
GUILE_EFFECTIVE_VERSION.

* debugger/Makefile.am (subpkgdatadir): VERSION ->
GUILE_EFFECTIVE_VERSION.

* Makefile.am (subpkgdatadir): VERSION -> GUILE_EFFECTIVE_VERSION.

21 years ago* Makefile.am (ice9dir): VERSION -> GUILE_EFFECTIVE_VERSION.
Rob Browning [Mon, 9 Dec 2002 00:50:17 +0000 (00:50 +0000)]
* Makefile.am (ice9dir): VERSION -> GUILE_EFFECTIVE_VERSION.

21 years ago* configure.in (GUILE_EFFECTIVE_VERSION): AC_SUBST.
Rob Browning [Mon, 9 Dec 2002 00:50:10 +0000 (00:50 +0000)]
* configure.in (GUILE_EFFECTIVE_VERSION): AC_SUBST.

21 years ago* scheme-options.texi (Build Config): add effective-version docs.
Rob Browning [Mon, 9 Dec 2002 00:49:52 +0000 (00:49 +0000)]
* scheme-options.texi (Build Config): add effective-version docs.

21 years ago* debugger/Makefile.am (subpkgdatadir): VERSION ->
Rob Browning [Mon, 9 Dec 2002 00:49:38 +0000 (00:49 +0000)]
* debugger/Makefile.am (subpkgdatadir): VERSION ->
GUILE_EFFECTIVE_VERSION.

21 years ago* debugger/breakpoints/Makefile.am (subpkgdatadir): VERSION ->
Rob Browning [Mon, 9 Dec 2002 00:49:24 +0000 (00:49 +0000)]
* debugger/breakpoints/Makefile.am (subpkgdatadir): VERSION ->
GUILE_EFFECTIVE_VERSION.

21 years ago* Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
Rob Browning [Mon, 9 Dec 2002 00:46:31 +0000 (00:46 +0000)]
* 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.

21 years ago* version.c (scm_effective_version): new function, also add
Rob Browning [Mon, 9 Dec 2002 00:46:24 +0000 (00:46 +0000)]
* version.c (scm_effective_version): new function, also add
effective-version.

21 years ago* version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
Rob Browning [Mon, 9 Dec 2002 00:46:16 +0000 (00:46 +0000)]
* 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.

21 years ago* Makefile.am (subpkgdatadir): VERSION -> GUILE_EFFECTIVE_VERSION.
Rob Browning [Mon, 9 Dec 2002 00:46:01 +0000 (00:46 +0000)]
* Makefile.am (subpkgdatadir): VERSION -> GUILE_EFFECTIVE_VERSION.

21 years ago* Makefile.am (subpkgdatadir): VERSION -> GUILE_EFFECTIVE_VERSION.
Rob Browning [Mon, 9 Dec 2002 00:43:51 +0000 (00:43 +0000)]
* Makefile.am (subpkgdatadir): VERSION -> GUILE_EFFECTIVE_VERSION.

* goops/Makefile.am (subpkgdatadir): VERSION ->
GUILE_EFFECTIVE_VERSION.

21 years ago* goops/Makefile.am (subpkgdatadir): VERSION ->
Rob Browning [Mon, 9 Dec 2002 00:43:27 +0000 (00:43 +0000)]
* goops/Makefile.am (subpkgdatadir): VERSION ->
GUILE_EFFECTIVE_VERSION.

21 years ago* Makefile.am (srfidir): VERSION -> GUILE_EFFECTIVE_VERSION.
Rob Browning [Mon, 9 Dec 2002 00:42:40 +0000 (00:42 +0000)]
* Makefile.am (srfidir): VERSION -> GUILE_EFFECTIVE_VERSION.

21 years ago* tests/version.test: test (effective-version).
Rob Browning [Mon, 9 Dec 2002 00:42:18 +0000 (00:42 +0000)]
* tests/version.test: test (effective-version).

21 years ago* threads.scm (par-map, par-for-each, parallel):
Mikael Djurfeldt [Wed, 4 Dec 2002 22:06:15 +0000 (22:06 +0000)]
* threads.scm (par-map, par-for-each, parallel):

* documentation.scm (object-documentation): Added support for
defmacros.

21 years ago*** empty log message ***
Marius Vollmer [Mon, 2 Dec 2002 01:18:31 +0000 (01:18 +0000)]
*** empty log message ***

21 years ago(srfiinclude_HEADERS): Added srfi-1.h.
Marius Vollmer [Mon, 2 Dec 2002 01:18:20 +0000 (01:18 +0000)]
(srfiinclude_HEADERS): Added srfi-1.h.

21 years agoChanges to the thread sections.
Marius Vollmer [Mon, 2 Dec 2002 01:04:28 +0000 (01:04 +0000)]
Changes to the thread sections.

21 years ago*** empty log message ***
Marius Vollmer [Mon, 2 Dec 2002 01:03:24 +0000 (01:03 +0000)]
*** empty log message ***

21 years ago(SUBDIRS): Removed qt.
Marius Vollmer [Mon, 2 Dec 2002 01:03:10 +0000 (01:03 +0000)]
(SUBDIRS): Removed qt.

21 years agoDo not configure QTHREADS. Do not define USE_COOP_THREADS. Changed
Marius Vollmer [Mon, 2 Dec 2002 01:02:46 +0000 (01:02 +0000)]
Do not configure QTHREADS.  Do not define USE_COOP_THREADS.  Changed
logic for thread package selection so that the default is
"coop-pthread" when -lpthread is found, "null" otherwise.

21 years ago(SCM_VALIDATE_THREAD): Moved to threads.h.
Marius Vollmer [Mon, 2 Dec 2002 01:00:50 +0000 (01:00 +0000)]
(SCM_VALIDATE_THREAD): Moved to threads.h.

21 years ago* threads.h: Do not include "libguile/coop-defs.h". Include
Marius Vollmer [Mon, 2 Dec 2002 01:00:41 +0000 (01:00 +0000)]
* 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".

21 years ago* pthread-threads.h: New, implement pthread-like API by deferring to
Marius Vollmer [Mon, 2 Dec 2002 01:00:20 +0000 (01:00 +0000)]
* pthread-threads.h: New, implement pthread-like API by deferring to
pthread itself.

21 years ago* null-threads.h: Implement pthread-like API as a set of macros.
Marius Vollmer [Mon, 2 Dec 2002 00:59:27 +0000 (00:59 +0000)]
* null-threads.h: Implement pthread-like API as a set of macros.

21 years ago(libguile_la_SOURCES): Removed iselect.c.
Marius Vollmer [Mon, 2 Dec 2002 00:58:42 +0000 (00:58 +0000)]
(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.

21 years ago(scm_init_guile_1): Do not call scm_init_iselect, which has been lost
Marius Vollmer [Mon, 2 Dec 2002 00:54:11 +0000 (00:54 +0000)]
(scm_init_guile_1): Do not call scm_init_iselect, which has been lost
in the reorganization.

21 years ago*** empty log message ***
Marius Vollmer [Mon, 2 Dec 2002 00:35:44 +0000 (00:35 +0000)]
*** empty log message ***

21 years ago* srfi-1.scm: Load srfi-1 extension.
Mikael Djurfeldt [Sun, 1 Dec 2002 13:56:11 +0000 (13:56 +0000)]
* srfi-1.scm: Load srfi-1 extension.
(map, map-in-order, for-each, member, assoc): Replaced by
primitives in srfi-1.c.
(map1): Defined as `map'.

21 years ago* srfi-1.scm: Load srfi-1 extension.
Mikael Djurfeldt [Sun, 1 Dec 2002 13:10:51 +0000 (13:10 +0000)]
* srfi-1.scm: Load srfi-1 extension.
(map, map-in-order, for-each, member): Replaced by primitives in
srfi-1.c.

* Makefile.am: Added rules for srfi-1.c.

* srfi-1.c, srfi-1.h: New files.

21 years ago* GUILE-VERSION: Added versioning info for srfi 1.
Mikael Djurfeldt [Sun, 1 Dec 2002 13:10:07 +0000 (13:10 +0000)]
* GUILE-VERSION: Added versioning info for srfi 1.

* configure.in (LIBGUILE_SRFI_SRFI_1_INTERFACE_CURRENT,
LIBGUILE_SRFI_SRFI_1_INTERFACE_REVISION,
LIBGUILE_SRFI_SRFI_1_INTERFACE_AGE,
LIBGUILE_SRFI_SRFI_1_INTERFACE): New AC_SUBST.

21 years ago* eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
Mikael Djurfeldt [Sun, 1 Dec 2002 13:09:26 +0000 (13:09 +0000)]
* 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.

* 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.

21 years ago* README: Added description of compat.
Mikael Djurfeldt [Sun, 1 Dec 2002 03:33:26 +0000 (03:33 +0000)]
* README: Added description of compat.

* compat/acconfig.h, compat/acinclude.m4, compat.h, configure.in:
New files.

21 years ago* evalext.[ch] (scm_m_undefine, undefine): Deprecated.
Dirk Herrmann [Sun, 24 Nov 2002 18:21:48 +0000 (18:21 +0000)]
* evalext.[ch] (scm_m_undefine, undefine):  Deprecated.

21 years ago* boot-9.scm (re-export-syntax): Re-introduced after accidentally
Dirk Herrmann [Sun, 24 Nov 2002 08:28:05 +0000 (08:28 +0000)]
* boot-9.scm (re-export-syntax):  Re-introduced after accidentally
removing it in my patch from 2002-11-16.

21 years agoThanks to Mikael Djurfeldt for a bugreport which led to the
Dirk Herrmann [Sun, 24 Nov 2002 08:18:19 +0000 (08:18 +0000)]
Thanks to Mikael Djurfeldt for a bugreport which led to the
following changes:

* slib.scm (%system-define): Removed.

(define): Changed to use define-private instead of
%system-define.

* boot-9.scm (define-private): Undid my changes from 2002-11-16
until Guile supports hygienic macros.

21 years agoAdd Stephen Compall for manual patches and myself for breakpoints.
Neil Jerram [Sun, 17 Nov 2002 22:23:03 +0000 (22:23 +0000)]
Add Stephen Compall for manual patches and myself for breakpoints.

21 years agoApplied patches (mostly Texinfo markup) from Stephen Compall. (finished now)
Neil Jerram [Sun, 17 Nov 2002 22:20:12 +0000 (22:20 +0000)]
Applied patches (mostly Texinfo markup) from Stephen Compall. (finished now)

21 years ago* debug.c (scm_make_iloc): Added missing "return".
Mikael Djurfeldt [Sun, 17 Nov 2002 22:18:51 +0000 (22:18 +0000)]
* debug.c (scm_make_iloc): Added missing "return".

21 years agoDefine local read-and-eval! in emacs interface.
Neil Jerram [Sun, 17 Nov 2002 22:17:59 +0000 (22:17 +0000)]
Define local read-and-eval! in emacs interface.

21 years agoApplied patches (mostly Texinfo markup) from Stephen Compall.
Neil Jerram [Sun, 17 Nov 2002 22:08:45 +0000 (22:08 +0000)]
Applied patches (mostly Texinfo markup) from Stephen Compall.

21 years ago*** empty log message ***
Marius Vollmer [Sun, 17 Nov 2002 14:56:47 +0000 (14:56 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Marius Vollmer [Sun, 17 Nov 2002 10:36:22 +0000 (10:36 +0000)]
*** empty log message ***

21 years ago(scm_eval_string_in_module): Validate second arg to be a module.
Marius Vollmer [Sun, 17 Nov 2002 10:35:49 +0000 (10:35 +0000)]
(scm_eval_string_in_module): Validate second arg to be a module.
Thanks to Arno Peters!

21 years ago* .cvsignore: remove goops.c
Dirk Herrmann [Sat, 16 Nov 2002 18:30:18 +0000 (18:30 +0000)]
* .cvsignore: remove goops.c

21 years ago* modules.c (scm_env_top_level, scm_lookup_closure_module,
Dirk Herrmann [Sat, 16 Nov 2002 16:56:52 +0000 (16:56 +0000)]
* 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.

21 years ago* goops.scm (standard-define-class): Changed definition to form
Dirk Herrmann [Sat, 16 Nov 2002 16:29:06 +0000 (16:29 +0000)]
* goops.scm (standard-define-class):  Changed definition to form
a 'real' macro definition.

21 years ago* eval.h (SCM_MAKE_ILOC): New macro.
Dirk Herrmann [Sat, 16 Nov 2002 16:20:14 +0000 (16:20 +0000)]
* eval.h (SCM_MAKE_ILOC):  New macro.

* debug.c (scm_make_iloc):  Use SCM_MAKE_ILOC instead of computing
the iloc bitpattern here.

21 years ago* syncase.scm (define-syntax, eval-when, fluid-let-syntax,
Dirk Herrmann [Sat, 16 Nov 2002 16:01:06 +0000 (16:01 +0000)]
* syncase.scm (define-syntax, eval-when, fluid-let-syntax,
identifier-syntax, let-syntax, letrec-syntax, syntax, syntax-case,
syntax-rules, with-syntax, include):  Changed definitions to form
'real' macro definitions.

21 years ago* boot-9.scm (define-private, export-syntax, export-syntax):
Dirk Herrmann [Sat, 16 Nov 2002 15:40:27 +0000 (15:40 +0000)]
* boot-9.scm (define-private, export-syntax, export-syntax):
Fixed my previous fix (blush).

21 years ago* boot-9.scm (define-private, export-syntax, export-syntax):
Dirk Herrmann [Sat, 16 Nov 2002 15:05:29 +0000 (15:05 +0000)]
* boot-9.scm (define-private, export-syntax, export-syntax):
Changed definitions to form 'real' macro definitions.

21 years ago* coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
Mikael Djurfeldt [Thu, 14 Nov 2002 17:17:40 +0000 (17:17 +0000)]
* 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.

21 years ago*** empty log message ***
Marius Vollmer [Sun, 10 Nov 2002 22:07:10 +0000 (22:07 +0000)]
*** empty log message ***

21 years ago(USE_THREADS, GUILE_ISELECT): Define always. We define them with
Marius Vollmer [Sun, 10 Nov 2002 22:06:32 +0000 (22:06 +0000)]
(USE_THREADS, GUILE_ISELECT): Define always.  We define them with
AC_DEFINE and not in some header file so that they are visible exactly
in the same way as they used to be.