1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-04 22:40:25 +02:00
Commit graph

7511 commits

Author SHA1 Message Date
Mikael Djurfeldt
ad280ae0a3 * configure.in (_THREAD_SAFE): Define when pthreads are enabled in
order to get thread safe versions of glibc functions.
2002-12-10 17:54:01 +00:00
Mikael Djurfeldt
094b640d77 (create_thread): Release heap before locking thread admin mutex. 2002-12-10 17:27:31 +00:00
Mikael Djurfeldt
c4c52ebe30 * threads.c (really_launch): Release heap (to prevent deadlock).
(create_thread): Release heap before locking thread admin mutex.
2002-12-10 16:51:14 +00:00
Mikael Djurfeldt
b0dc3d710a * threads.c (scm_i_thread_invalidate_freelists): New
function.

* gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
2002-12-10 16:09:37 +00:00
Mikael Djurfeldt
8c3300070b * modules.c (scm_export): Inserted a return statement. 2002-12-10 16:07:30 +00:00
Han-Wen Nienhuys
06e80f59f9 * modules.c (scm_export): new function
* gc-card.c: add a note about malloc()/free() overhead.
2002-12-10 13:26:25 +00:00
Mikael Djurfeldt
a12611c3e7 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
in srcdir.
2002-12-10 10:31:44 +00:00
Mikael Djurfeldt
c7fabadfe0 * 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-10 09:35:06 +00:00
Mikael Djurfeldt
06babeccd1 *** empty log message *** 2002-12-10 08:54:48 +00:00
Mikael Djurfeldt
52340b651a * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
Removed accidental #if 0 around these functions.
2002-12-09 19:27:44 +00:00
Mikael Djurfeldt
9bc4701cd3 * __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.
2002-12-09 13:42:58 +00:00
Mikael Djurfeldt
fc85d09560 * threads.scm (letpar): New macro. 2002-12-09 12:58:52 +00:00
Rob Browning
9e6e154e84 * 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.
2002-12-09 00:52:03 +00:00
Rob Browning
b2cbe8d8a2 *** empty log message *** 2002-12-09 00:51:53 +00:00
Rob Browning
08f406b068 * GUILE-VERSION (GUILE_EFFECTIVE_VERSION): new variable. 2002-12-09 00:51:10 +00:00
Rob Browning
3d9782e928 * debugger/breakpoints/Makefile.am (subpkgdatadir): VERSION ->
GUILE_EFFECTIVE_VERSION.

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

* Makefile.am (subpkgdatadir): VERSION -> GUILE_EFFECTIVE_VERSION.
2002-12-09 00:50:34 +00:00
Rob Browning
717a0e5b8c * Makefile.am (ice9dir): VERSION -> GUILE_EFFECTIVE_VERSION. 2002-12-09 00:50:17 +00:00
Rob Browning
41d8c90a5e * configure.in (GUILE_EFFECTIVE_VERSION): AC_SUBST. 2002-12-09 00:50:10 +00:00
Rob Browning
467409e8db * scheme-options.texi (Build Config): add effective-version docs. 2002-12-09 00:49:52 +00:00
Rob Browning
13f6982bc2 * debugger/Makefile.am (subpkgdatadir): VERSION ->
GUILE_EFFECTIVE_VERSION.
2002-12-09 00:49:38 +00:00
Rob Browning
056eff7ccc * debugger/breakpoints/Makefile.am (subpkgdatadir): VERSION ->
GUILE_EFFECTIVE_VERSION.
2002-12-09 00:49:24 +00:00
Rob Browning
d8a20ddbfb * 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-09 00:46:31 +00:00
Rob Browning
ccf01e3eaf * version.c (scm_effective_version): new function, also add
effective-version.
2002-12-09 00:46:24 +00:00
Rob Browning
020bc83889 * 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.
2002-12-09 00:46:16 +00:00
Rob Browning
c0784b410b * Makefile.am (subpkgdatadir): VERSION -> GUILE_EFFECTIVE_VERSION. 2002-12-09 00:46:01 +00:00
Rob Browning
e50186ab08 * Makefile.am (subpkgdatadir): VERSION -> GUILE_EFFECTIVE_VERSION.
* goops/Makefile.am (subpkgdatadir): VERSION ->
GUILE_EFFECTIVE_VERSION.
2002-12-09 00:43:51 +00:00
Rob Browning
aad6f7db2c * goops/Makefile.am (subpkgdatadir): VERSION ->
GUILE_EFFECTIVE_VERSION.
2002-12-09 00:43:27 +00:00
Rob Browning
efb5821894 * Makefile.am (srfidir): VERSION -> GUILE_EFFECTIVE_VERSION. 2002-12-09 00:42:40 +00:00
Rob Browning
1844ae316e * tests/version.test: test (effective-version). 2002-12-09 00:42:18 +00:00
Mikael Djurfeldt
abce330ced * threads.scm (par-map, par-for-each, parallel):
* documentation.scm (object-documentation): Added support for
defmacros.
2002-12-04 22:06:15 +00:00
Marius Vollmer
2ab05d7843 *** empty log message *** 2002-12-02 01:18:31 +00:00
Marius Vollmer
d9d40de4ac (srfiinclude_HEADERS): Added srfi-1.h. 2002-12-02 01:18:20 +00:00
Marius Vollmer
931b9657a0 Changes to the thread sections. 2002-12-02 01:04:28 +00:00
Marius Vollmer
5441c65c48 *** empty log message *** 2002-12-02 01:03:24 +00:00
Marius Vollmer
b2635f91b7 (SUBDIRS): Removed qt. 2002-12-02 01:03:10 +00:00
Marius Vollmer
18622c4e84 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.
2002-12-02 01:02:46 +00:00
Marius Vollmer
1d798a004a (SCM_VALIDATE_THREAD): Moved to threads.h. 2002-12-02 01:00:50 +00:00
Marius Vollmer
d823b11b10 * 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".
2002-12-02 01:00:41 +00:00
Marius Vollmer
eac85310c2 * pthread-threads.h: New, implement pthread-like API by deferring to
pthread itself.
2002-12-02 01:00:20 +00:00
Marius Vollmer
d035029382 * null-threads.h: Implement pthread-like API as a set of macros. 2002-12-02 00:59:27 +00:00
Marius Vollmer
340c49bf2c (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.
2002-12-02 00:58:42 +00:00
Marius Vollmer
aeb08e9b18 (scm_init_guile_1): Do not call scm_init_iselect, which has been lost
in the reorganization.
2002-12-02 00:54:11 +00:00
Marius Vollmer
2902a459df *** empty log message *** 2002-12-02 00:35:44 +00:00
Mikael Djurfeldt
7692d26b31 * 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'.
2002-12-01 13:56:11 +00:00
Mikael Djurfeldt
ee6aac9733 * 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.
2002-12-01 13:10:51 +00:00
Mikael Djurfeldt
cfc7c7c03f * 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.
2002-12-01 13:10:07 +00:00
Mikael Djurfeldt
504d99c5f8 * 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.
2002-12-01 13:09:26 +00:00
Mikael Djurfeldt
0359fc922c * README: Added description of compat.
* compat/acconfig.h, compat/acinclude.m4, compat.h, configure.in:
New files.
2002-12-01 03:33:26 +00:00
Dirk Herrmann
63dd3413f3 * evalext.[ch] (scm_m_undefine, undefine): Deprecated. 2002-11-24 18:21:48 +00:00
Dirk Herrmann
f2cbc0e567 * boot-9.scm (re-export-syntax): Re-introduced after accidentally
removing it in my patch from 2002-11-16.
2002-11-24 08:28:05 +00:00