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

7681 commits

Author SHA1 Message Date
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
Marius Vollmer
5441c65c48 *** empty log message *** 2002-12-02 01:03:24 +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
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
Dirk Herrmann
63dd3413f3 * evalext.[ch] (scm_m_undefine, undefine): Deprecated. 2002-11-24 18:21:48 +00:00
Mikael Djurfeldt
4ba5f279f0 * debug.c (scm_make_iloc): Added missing "return". 2002-11-17 22:18:51 +00:00
Marius Vollmer
56ae231fbe *** empty log message *** 2002-11-17 10:36:22 +00:00
Marius Vollmer
aeec5be115 (scm_eval_string_in_module): Validate second arg to be a module.
Thanks to Arno Peters!
2002-11-17 10:35:49 +00:00
Dirk Herrmann
80b28865d1 * .cvsignore: remove goops.c 2002-11-16 18:30:18 +00:00
Dirk Herrmann
c88b1456e0 * 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.
2002-11-16 16:56:52 +00:00
Dirk Herrmann
a8a19efc2b * eval.h (SCM_MAKE_ILOC): New macro.
* debug.c (scm_make_iloc):  Use SCM_MAKE_ILOC instead of computing
the iloc bitpattern here.
2002-11-16 16:20:14 +00:00
Mikael Djurfeldt
7673491416 * 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.
2002-11-14 17:17:40 +00:00
Marius Vollmer
8b5b4a758c *** empty log message *** 2002-11-10 22:07:10 +00:00
Marius Vollmer
ccb8b13859 (USE_THREADS, GUILE_ISELECT): Do not define here. They are defined in
configure.in.
2002-11-10 22:05:22 +00:00
Marius Vollmer
911782b79c Removed SCM_API from function definitions. SCM_API is only for
declarations.
2002-11-10 22:04:26 +00:00
Mikael Djurfeldt
9be8bb4541 * coop-pthreads.h: Added support for thread specific data to the
generic C API for the coop-pthreads case.
2002-11-07 14:35:08 +00:00
Mikael Djurfeldt
6c214b6217 * threads.c, threads.h (scm_cond_broadcast): Added missing function. 2002-11-07 13:55:25 +00:00
Mikael Djurfeldt
e5a830847e * threads.c, threads.h (scm_cond_init): Undo unintentional API
change.
2002-11-07 13:29:12 +00:00
Marius Vollmer
7edf178eee *** empty log message *** 2002-11-04 15:43:17 +00:00
Marius Vollmer
79796da5b5 (coop_next_runnable_thread): Removed, wich should have happened when
GUILE_ISELECT was hard-wired.
2002-11-04 15:43:00 +00:00
Marius Vollmer
7caa1b0780 *** empty log message *** 2002-11-03 22:09:33 +00:00
Marius Vollmer
3d7f708f21 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
SCM_DEBUG_DEPRECATED.  Removed their use thru-out Guile.
2002-11-03 22:09:20 +00:00
Marius Vollmer
5dacb21f59 (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.
2002-11-03 22:07:57 +00:00
Marius Vollmer
7b3381f44d (scm_integer_expt): Make 0^z == 0 for z != 0. Also for reals. 2002-11-03 21:57:48 +00:00
Marius Vollmer
bb11cbf4eb *** empty log message *** 2002-11-03 17:22:21 +00:00
Marius Vollmer
5d5bd0183e Include "_scm.h" before testing HAVE_UNISTD_H. Thanks to Bill
Schottstaedt!
2002-11-03 17:18:28 +00:00
Marius Vollmer
1d4cbbed6e *** empty log message *** 2002-11-03 17:15:14 +00:00
Marius Vollmer
d57ed70201 (scm_integer_expt): Make 0^z == 0 for z != 0. 2002-11-03 17:13:50 +00:00
Marius Vollmer
7f5b1b7739 *** empty log message *** 2002-11-03 01:02:12 +00:00
Marius Vollmer
845944c3d9 (HAVE_RESTARTABLE_SYSCALLS): Do define even when
SCM_COPT_THREADS is defined.
(SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
is defined.
2002-11-03 01:01:43 +00:00
Marius Vollmer
05166e1aac 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.
2002-11-03 00:48:41 +00:00
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
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
Marius Vollmer
30f920c30e *** empty log message *** 2002-10-27 20:29:02 +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