bpt/guile.git
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.

21 years ago(USE_THREADS, GUILE_ISELECT): Do not define here. They are defined in
Marius Vollmer [Sun, 10 Nov 2002 22:05:22 +0000 (22:05 +0000)]
(USE_THREADS, GUILE_ISELECT): Do not define here.  They are defined in
configure.in.

21 years agoRemoved SCM_API from function definitions. SCM_API is only for
Marius Vollmer [Sun, 10 Nov 2002 22:04:26 +0000 (22:04 +0000)]
Removed SCM_API from function definitions.  SCM_API is only for
declarations.

21 years agoSmall textual changes to GOOPS manual (for HTML generation).
Neil Jerram [Fri, 8 Nov 2002 00:36:46 +0000 (00:36 +0000)]
Small textual changes to GOOPS manual (for HTML generation).

21 years agoRemove old code that was already commented out.
Neil Jerram [Thu, 7 Nov 2002 20:52:36 +0000 (20:52 +0000)]
Remove old code that was already commented out.

21 years ago* coop-pthreads.h: Added support for thread specific data to the
Mikael Djurfeldt [Thu, 7 Nov 2002 14:35:08 +0000 (14:35 +0000)]
* coop-pthreads.h: Added support for thread specific data to the
generic C API for the coop-pthreads case.

21 years ago* threads.c, threads.h (scm_cond_broadcast): Added missing function.
Mikael Djurfeldt [Thu, 7 Nov 2002 13:55:25 +0000 (13:55 +0000)]
* threads.c, threads.h (scm_cond_broadcast): Added missing function.

21 years ago*** empty log message ***
Marius Vollmer [Thu, 7 Nov 2002 13:46:05 +0000 (13:46 +0000)]
*** empty log message ***

21 years ago(format): Use 'monitor' properly. Not the definition
Marius Vollmer [Thu, 7 Nov 2002 13:45:53 +0000 (13:45 +0000)]
(format): Use 'monitor' properly.  Not the definition
needs to be restricted, the actual function needs to be.

21 years ago* threads.c, threads.h (scm_cond_init): Undo unintentional API
Mikael Djurfeldt [Thu, 7 Nov 2002 13:29:12 +0000 (13:29 +0000)]
* threads.c, threads.h (scm_cond_init): Undo unintentional API
change.

21 years agoNew file for tests related to options interface.
Neil Jerram [Wed, 6 Nov 2002 00:38:44 +0000 (00:38 +0000)]
New file for tests related to options interface.

21 years agoFix error in recent define-option-interface "simplification".
Neil Jerram [Wed, 6 Nov 2002 00:29:24 +0000 (00:29 +0000)]
Fix error in recent define-option-interface "simplification".
Fix source breakpoints to cope with port whose filename is #f.
Ensure that position recording is enabled when source breakpoint module loaded.

21 years agoSimplify code for define-option-interface.
Neil Jerram [Mon, 4 Nov 2002 19:40:49 +0000 (19:40 +0000)]
Simplify code for define-option-interface.

21 years agoWhitespace and markup fixes.
Neil Jerram [Mon, 4 Nov 2002 19:03:54 +0000 (19:03 +0000)]
Whitespace and markup fixes.

21 years agoImport readline function dynamically when necessary.
Neil Jerram [Mon, 4 Nov 2002 18:58:15 +0000 (18:58 +0000)]
Import readline function dynamically when necessary.

21 years ago*** empty log message ***
Marius Vollmer [Mon, 4 Nov 2002 15:43:17 +0000 (15:43 +0000)]
*** empty log message ***

21 years ago(coop_next_runnable_thread): Removed, wich should have happened when
Marius Vollmer [Mon, 4 Nov 2002 15:43:00 +0000 (15:43 +0000)]
(coop_next_runnable_thread): Removed, wich should have happened when
GUILE_ISELECT was hard-wired.

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

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

21 years ago* __scm.h (USE_THREADS, GUILE_ISELECT): Define when
Marius Vollmer [Sun, 3 Nov 2002 22:09:20 +0000 (22:09 +0000)]
* __scm.h (USE_THREADS, GUILE_ISELECT): Define when
SCM_DEBUG_DEPRECATED.  Removed their use thru-out Guile.

21 years agoDo not add "threads.o" to the libobjs, it is now always compiled.
Marius Vollmer [Sun, 3 Nov 2002 22:08:49 +0000 (22:08 +0000)]
Do not add "threads.o" to the libobjs, it is now always compiled.
(USE_THREADS, GUILE_ISELECT): Do not define.

21 years ago(libguile_la_SOURCES): Added threads.c
Marius Vollmer [Sun, 3 Nov 2002 22:07:57 +0000 (22:07 +0000)]
(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.

21 years ago(scm_integer_expt): Make 0^z == 0 for z != 0. Also for reals.
Marius Vollmer [Sun, 3 Nov 2002 21:57:48 +0000 (21:57 +0000)]
(scm_integer_expt): Make 0^z == 0 for z != 0.  Also for reals.

21 years ago*** empty log message ***
Marius Vollmer [Sun, 3 Nov 2002 19:14:33 +0000 (19:14 +0000)]
*** empty log message ***

21 years ago(format): Wrap a monitor around format:format since it is not
Marius Vollmer [Sun, 3 Nov 2002 19:14:08 +0000 (19:14 +0000)]
(format): Wrap a monitor around format:format since it is not
thread-safe.

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

21 years agoInclude "_scm.h" before testing HAVE_UNISTD_H. Thanks to Bill
Marius Vollmer [Sun, 3 Nov 2002 17:18:28 +0000 (17:18 +0000)]
Include "_scm.h" before testing HAVE_UNISTD_H.  Thanks to Bill
Schottstaedt!

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

21 years ago(scm_integer_expt): Make 0^z == 0 for z != 0.
Marius Vollmer [Sun, 3 Nov 2002 17:13:50 +0000 (17:13 +0000)]
(scm_integer_expt): Make 0^z == 0 for z != 0.

21 years ago*** empty log message ***
Marius Vollmer [Sun, 3 Nov 2002 01:02:12 +0000 (01:02 +0000)]
*** empty log message ***

21 years ago(HAVE_RESTARTABLE_SYSCALLS): Do define even when
Marius Vollmer [Sun, 3 Nov 2002 01:01:43 +0000 (01:01 +0000)]
(HAVE_RESTARTABLE_SYSCALLS): Do define even when
SCM_COPT_THREADS is defined.
(SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
is defined.

21 years agoSome harmless renamings of internal stuff.
Marius Vollmer [Sun, 3 Nov 2002 00:48:41 +0000 (00:48 +0000)]
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.

21 years ago*** empty log message ***
Marius Vollmer [Sat, 2 Nov 2002 01:09:20 +0000 (01:09 +0000)]
*** empty log message ***

21 years agoRedone completely, you might start testing it now.
Marius Vollmer [Sat, 2 Nov 2002 01:02:35 +0000 (01:02 +0000)]
Redone completely, you might start testing it now.

21 years agoInclude <errno.h< so that SCM_SYSCALL is correctly
Marius Vollmer [Sat, 2 Nov 2002 01:01:00 +0000 (01:01 +0000)]
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.

21 years agofixed mangled comment.
Marius Vollmer [Sat, 2 Nov 2002 00:59:04 +0000 (00:59 +0000)]
fixed mangled comment.

21 years agoCloser, but not there.
Marius Vollmer [Wed, 30 Oct 2002 20:28:52 +0000 (20:28 +0000)]
Closer, but not there.

21 years agoUpdated, but still totally unusable.
Marius Vollmer [Wed, 30 Oct 2002 10:41:51 +0000 (10:41 +0000)]
Updated, but still totally unusable.

21 years ago * scheme-modules.texi (Environments): only available when
Gary Houston [Sun, 27 Oct 2002 21:26:00 +0000 (21:26 +0000)]
* scheme-modules.texi (Environments): only available when
(ice-9 r5rs) is used.
* scsh.texi (The Scheme shell (scsh)): current url is www.scsh.net.

21 years ago*** empty log message ***
Marius Vollmer [Sun, 27 Oct 2002 20:47:38 +0000 (20:47 +0000)]
*** empty log message ***

21 years agoUpdated mutex and condition varable functions.
Marius Vollmer [Sun, 27 Oct 2002 20:47:31 +0000 (20:47 +0000)]
Updated mutex and condition varable functions.

21 years ago*** empty log message ***
Marius Vollmer [Sun, 27 Oct 2002 20:36:45 +0000 (20:36 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Marius Vollmer [Sun, 27 Oct 2002 20:29:02 +0000 (20:29 +0000)]
*** empty log message ***

21 years agoHandle thread package "coop-pthread" with alias "copt" and define
Marius Vollmer [Sun, 27 Oct 2002 20:28:52 +0000 (20:28 +0000)]
Handle thread package "coop-pthread" with alias "copt" and define
USE_COPT_THREADS when it is selected.  Always define GUILE_ISELECT.

21 years ago(reentry_barrier_mutex): Reimplemented with scm_make_mutex, etc.
Marius Vollmer [Sun, 27 Oct 2002 20:27:10 +0000 (20:27 +0000)]
(reentry_barrier_mutex): Reimplemented with scm_make_mutex, etc.

21 years ago* coop-pthreads.h, coop-pthreads.c: New, but unfinished.
Marius Vollmer [Sun, 27 Oct 2002 20:26:21 +0000 (20:26 +0000)]
* coop-pthreads.h, coop-pthreads.c: New, but unfinished.

21 years ago(signal_cell_handlers, install_handler_data,
Marius Vollmer [Sun, 27 Oct 2002 20:25:17 +0000 (20:25 +0000)]
(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.

21 years ago(scm_async_click): Reset pending_asyncs, handle
Marius Vollmer [Sun, 27 Oct 2002 20:22:01 +0000 (20:22 +0000)]
(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.

21 years ago* __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
Marius Vollmer [Sun, 27 Oct 2002 20:16:18 +0000 (20:16 +0000)]
* __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.

21 years ago(hell_mutex): Reimplemented using scm_make_mutex, etc.
Marius Vollmer [Sun, 27 Oct 2002 20:13:24 +0000 (20:13 +0000)]
(hell_mutex): Reimplemented using scm_make_mutex, etc.

21 years agoReplaced GUILE_ISELECT with
Marius Vollmer [Sun, 27 Oct 2002 20:13:10 +0000 (20:13 +0000)]
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.

21 years ago(scm_cell, scm_double_cell): Also allow USE_COPT_THREADS to not
Marius Vollmer [Sun, 27 Oct 2002 20:13:00 +0000 (20:13 +0000)]
(scm_cell, scm_double_cell): Also allow USE_COPT_THREADS to not
protect the slot initializers.

21 years ago(scm_init_guile_1): Call scm_init_thread_procs. This is because
Marius Vollmer [Sun, 27 Oct 2002 20:12:51 +0000 (20:12 +0000)]
(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.

21 years ago* threads.h: Include "coop-pthreads.h" when requested.
Marius Vollmer [Sun, 27 Oct 2002 20:12:37 +0000 (20:12 +0000)]
* 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-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.

21 years ago* null-threads.h (scm_null_mutex, scm_null_mutex_init,
Marius Vollmer [Sun, 27 Oct 2002 20:12:27 +0000 (20:12 +0000)]
* 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.

21 years ago* coop-defs.h (coop_m): Added 'level' field.
Marius Vollmer [Sun, 27 Oct 2002 20:12:07 +0000 (20:12 +0000)]
* 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.

21 years ago * upstream/Makefile.am (ltdl.h.diff, ltdl.c.diff): add $(srcdir)
Gary Houston [Sun, 27 Oct 2002 19:38:43 +0000 (19:38 +0000)]
* upstream/Makefile.am (ltdl.h.diff, ltdl.c.diff): add $(srcdir)
in diff commands to first diff file.