1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-05 06:50:21 +02:00
Commit graph

7511 commits

Author SHA1 Message Date
Marius Vollmer
d52f53b1ff *** empty log message *** 2002-11-02 01:09:20 +00:00
Marius Vollmer
0019d6a19d Redone completely, you might start testing it now. 2002-11-02 01:02:35 +00:00
Marius Vollmer
cfe062d097 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-11-02 01:01:00 +00:00
Marius Vollmer
246c563ba9 fixed mangled comment. 2002-11-02 00:59:04 +00:00
Marius Vollmer
c28b0ba254 Closer, but not there. 2002-10-30 20:28:52 +00:00
Marius Vollmer
cf8ea1a3d1 Updated, but still totally unusable. 2002-10-30 10:41:51 +00:00
Gary Houston
d703aba57a * scheme-modules.texi (Environments): only available when
(ice-9 r5rs) is used.
	* scsh.texi (The Scheme shell (scsh)): current url is www.scsh.net.
2002-10-27 21:26:00 +00:00
Marius Vollmer
a48c626fba *** empty log message *** 2002-10-27 20:47:38 +00:00
Marius Vollmer
57c84ccd60 Updated mutex and condition varable functions. 2002-10-27 20:47:31 +00:00
Marius Vollmer
e2d820a18c *** empty log message *** 2002-10-27 20:36:45 +00:00
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
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
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
Dirk Herrmann
5ec1d2c8e0 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
scm_definedp to scm_defined_p and deprecated scm_definedp.
2002-10-19 09:07:23 +00:00
Dirk Herrmann
100ae50db2 * async.h, async.c (scm_system_async): Fixed deprecation to work
correctly when deprecated features are excluded.
2002-10-19 08:22:50 +00:00
Marius Vollmer
f0b4d944b4 Added blurb about "null" threads. 2002-10-16 16:36:29 +00:00
Marius Vollmer
2794cb5073 *** empty log message *** 2002-10-16 16:33:12 +00:00