1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-13 09:10:26 +02:00
Commit graph

8995 commits

Author SHA1 Message Date
Marius Vollmer
30f920c30e *** empty log message *** 2002-10-27 20:29:02 +00:00
Marius Vollmer
18306183b5 Handle thread package "coop-pthread" with alias "copt" and define
USE_COPT_THREADS when it is selected.  Always define GUILE_ISELECT.
2002-10-27 20:28:52 +00:00
Marius Vollmer
bb0f37e78f (reentry_barrier_mutex): Reimplemented with scm_make_mutex, etc. 2002-10-27 20:27:10 +00:00
Marius Vollmer
d97eb496fc * coop-pthreads.h, coop-pthreads.c: New, but unfinished. 2002-10-27 20:26:21 +00:00
Marius Vollmer
dbbaa07cab (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.
2002-10-27 20:25:17 +00:00
Marius Vollmer
402858a4d3 (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.
2002-10-27 20:22:01 +00:00
Marius Vollmer
1ceead47c4 * __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.
2002-10-27 20:16:18 +00:00
Marius Vollmer
2132f0d2a5 (hell_mutex): Reimplemented using scm_make_mutex, etc. 2002-10-27 20:13:24 +00:00
Marius Vollmer
1d0bde44b7 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.
2002-10-27 20:13:10 +00:00
Marius Vollmer
b1e945d7ec (scm_cell, scm_double_cell): Also allow USE_COPT_THREADS to not
protect the slot initializers.
2002-10-27 20:13:00 +00:00
Marius Vollmer
e30a0d8565 (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.
2002-10-27 20:12:51 +00:00
Marius Vollmer
5f05c406d2 * 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.
2002-10-27 20:12:37 +00:00
Marius Vollmer
4b9154e73e * 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.
2002-10-27 20:12:27 +00:00
Marius Vollmer
79cd5b8eda * 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.
2002-10-27 20:12:07 +00:00
Gary Houston
026f9e6654 * upstream/Makefile.am (ltdl.h.diff, ltdl.c.diff): add $(srcdir)
in diff commands to first diff file.
2002-10-27 19:38:43 +00:00
Marius Vollmer
132fe7af49 *** empty log message *** 2002-10-27 17:27:40 +00:00
Marius Vollmer
f4f16eccc2 (%thread-handler): Explicitely return '#f'. This value will be
returned by join-thread.
2002-10-27 17:27:25 +00:00
Neil Jerram
7195a60f74 NEWS entry for breakpoints. 2002-10-27 13:38:24 +00:00
Neil Jerram
9a69a50ed5 Rewrite chapter on debugging features. 2002-10-27 13:36:18 +00:00
Rob Browning
bba8cddc40 *** empty log message *** 2002-10-27 07:01:49 +00:00
Rob Browning
8ce8525026 * configure.in: rearrange things so that --enable-error-on-warning
uses GUILE_ERROR_ON_WARNING as an indicator and actually set the
value of CFLAGS to include -Werror at the end of configure.in so
it doesn't break any of the non-Werror clean configure tests.
Add check for assert.h since it's used in config.h.in.
2002-10-27 07:01:26 +00:00
Neil Jerram
8ee7506bab Merge enhanced debugging features from `guile-debugger' package. 2002-10-26 19:05:28 +00:00
Neil Jerram
daeea2a9fb Make (scripts lint) announce resolved module name. 2002-10-26 18:58:17 +00:00
Marius Vollmer
aae8783bd3 *** empty log message *** 2002-10-26 12:39:20 +00:00
Marius Vollmer
4b0d7e1d88 Mention libguile-ltdl. 2002-10-26 12:39:10 +00:00
Rob Browning
c686a65ceb *** empty log message *** 2002-10-26 06:17:36 +00:00
Rob Browning
9257da7d0a 2002-10-21 Mikael Djurfeldt <mdj@linnaeus>
* readline.scm (activate-readline): Look for use-emacs-interface
option in the guile-user module instead of the-root-module.
2002-10-26 06:17:29 +00:00
Rob Browning
cf2c8da9ac 2002-10-20 Mikael Djurfeldt <mdj@linnaeus>
* boot-9.scm (top-repl): Look for use-emacs-interface in
guile-user-module (should it be there?) instead of
the-root-module.
2002-10-26 06:16:34 +00:00
Marius Vollmer
18f7c04d2a *** empty log message *** 2002-10-25 16:42:11 +00:00
Marius Vollmer
6016d3a754 (build-link): Include "-lguile-ltdl" in link flags. 2002-10-25 16:41:59 +00:00
Marius Vollmer
a069ea8b98 *** empty log message *** 2002-10-25 16:26:18 +00:00
Marius Vollmer
abeff04457 * Makefile.am (INCLUDES): Include from ../libguile-ltdl/ instead
of from $(INCLTDL).
(libguile_la_LIBADD): Use ../libguile-ltdl/libguile-ltdl.la
instead of $(LIBLTDL).

* guile.c: Include "guile-ltdl.h" instead of "libltdl/ltdl.h".
(main): switch to scm_lt_dlset_preloaded_symbols;

* dynl.c: Include "guile-ltdl.h" instead of "libltdl/ltdl.h".
(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();
2002-10-25 16:26:07 +00:00
Marius Vollmer
a05b4f6e02 * configure.in: Do not call AC_LTDL_INSTALLABLE and do not recurse
into libltdl subdirectory.  Call AC_LIB_LTDL.  Do not substitute
INCLLTDL and LIBLTDL, they are not needed.  Create
libguile-ltdl/Makefile.am and libguile-ltdl/upstream/Makefile.am.
* libguile-ltdl/: Copied from HEAD branch.
* autogen.sh: Do not populate libltdl/ directory.
* Makefile.am (SUBDIRS): Use libguile-ltdl instead of libltdl.
2002-10-25 16:21:08 +00:00
Marius Vollmer
fb6c068cb0 Copied from HEAD. 2002-10-25 15:55:30 +00:00
cvs2svn
89a0e8d99e This commit was manufactured by cvs2svn to create branch
'branch_release-1-6'.
2002-10-25 15:03:02 +00:00
Marius Vollmer
bf1fa0a5dd *** empty log message *** 2002-10-25 15:03:01 +00:00
Marius Vollmer
f5d6f0fcab * upstream/ltdl.c: New copy from libtool 1.4.3.
* raw-ltdl.c: Merged in changes from libtool 1.4.3.
2002-10-25 15:02:46 +00:00
Marius Vollmer
fc41ba03f3 *** empty log message *** 2002-10-21 12:53:29 +00:00
Marius Vollmer
429d88d4e7 New stuff about the thread support. 2002-10-21 12:20:01 +00:00
Marius Vollmer
65a23095ab *** empty log message *** 2002-10-21 12:19:08 +00:00
Marius Vollmer
585356dcbd Changed logic in thread support configuration such that
--with-threads=no is equivalent to --with-threads=null.  On platforms
that are not supported by QuickThreads, we also use the null-threads.
Thus, USE_THREADS is always defined now.
2002-10-21 12:16:25 +00:00
Marius Vollmer
64e00566db Include <time.h>. Also, use <...> for inclusion of system headers. 2002-10-21 12:03:54 +00:00
Marius Vollmer
03453b05f3 *** empty log message *** 2002-10-21 12:03:46 +00:00
Marius Vollmer
29b6ae0748 (%thread-handler): Do not call unmask-signals, that should be
unnecessary now.
2002-10-21 12:03:30 +00:00
Mikael Djurfeldt
c2015a4f53 * readline.scm (activate-readline): Look for use-emacs-interface
option in the guile-user module instead of the-root-module.
2002-10-21 11:22:04 +00:00
Marius Vollmer
087ed40df2 *** empty log message *** 2002-10-20 22:59:32 +00:00
Marius Vollmer
6182ceacb4 (SCM_MAKE_VALIDATE_MSG): New. Use it instead of SCM_MAKE_VALIDATE in
lots of places to gove better error messages.  Thanks to Bill
Schottstaedt!
2002-10-20 22:59:01 +00:00
Mikael Djurfeldt
a7785f36d4 *** empty log message *** 2002-10-20 21:51:53 +00:00
Mikael Djurfeldt
454b82f41f * boot-9.scm (top-repl): Look for use-emacs-interface in
guile-user-module (should it be there?) instead of
the-root-module.
2002-10-20 21:51:16 +00:00
Neil Jerram
0a50eeaadb Auto docstring updates, including soft port enhancement. 2002-10-19 16:33:25 +00:00