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

5047 commits

Author SHA1 Message Date
Marius Vollmer
fc240b46e9 (scm_c_issue_deprecation_warning): Use malloc instead of scm_malloc.
The latter can not be used during GC.
2005-03-10 18:05:25 +00:00
Marius Vollmer
d1c38e114e *** empty log message *** 2005-03-09 22:15:32 +00:00
Marius Vollmer
d152d44ba8 (scm_compile_shell_switches): Added 2005 to Copyright years. 2005-03-09 22:11:56 +00:00
Marius Vollmer
99ec43c198 *** empty log message *** 2005-03-09 19:23:55 +00:00
Marius Vollmer
b5fa979ca6 (ensure_state_size, ensure_all_state_sizes, resize_all_states):
Collapsed ensure_state_size and ensure_all_state_sizes into one
function named resize_all_states.  Allocate new vectors outside of
single threaded region.  Do only simple things inside that region.
(scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex while
adding to the global lists.
2005-03-09 19:20:49 +00:00
Marius Vollmer
443840184b (scm_i_sweep_card): Do not increase/decrease scm_gc_running_p.
Sweeping can happen in parallel with allocation.
2005-03-09 19:17:19 +00:00
Marius Vollmer
b2a339f6e5 Updated comments for current threading implementation. 2005-03-09 19:14:36 +00:00
Marius Vollmer
0c97d7dd66 (scm_i_frame_single_threaded): Removed.
(scm_i_thread): Removed unused signal_asyncs field.
(threads_mark): Do not mark it.
(guilify_self_1): Do not initialize it.  Do initialize
continuation_root field.
(do_thread_exit): Do not remove thread from all_threads list.
(on_thread_exit): Do it here, after leaving guile mode.
(sleep_level): Removed.
(scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
returning.  Do not support recursive sleeps.
(scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
entry.  Do not support recursive sleeps.
2005-03-09 19:13:59 +00:00
Marius Vollmer
461f34aa1b *** empty log message *** 2005-03-08 00:58:55 +00:00
Marius Vollmer
5a3ce59e21 (INCLUDES): Removed @LTDLINCL@.
(libguile_la_LIBADD): Removed @LIBLTDL@.
2005-03-08 00:53:21 +00:00
Marius Vollmer
b9d9ad3a2a *** empty log message *** 2005-03-07 22:33:46 +00:00
Marius Vollmer
627c72a944 Include "libguile/async.h" for SCM_CRITICAL_SECTION_START/END. 2005-03-07 22:32:22 +00:00
Marius Vollmer
4e047c3e46 Include "libguile/async.h" for SCM_CRITICAL_SECTION_START/END. 2005-03-07 21:42:02 +00:00
Marius Vollmer
54f2445baa * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
not zero.
2005-03-07 21:40:19 +00:00
Marius Vollmer
8b7f0bb35b * continuations.c (scm_make_continuation): No longer a critical
section.
(scm_dynthrow):  Abort when scm_i_critical_section_level is
not zero.
2005-03-07 21:39:56 +00:00
Marius Vollmer
5e3545d00e (scm_debug_options): Replace SCM_CRITICAL_SECTION_START/END with a
frame and scm_frame_critical_section.
2005-03-07 21:33:18 +00:00
Marius Vollmer
aeba601d56 (scm_make_continuation): No longer a critical section. 2005-03-07 21:32:00 +00:00
Marius Vollmer
a4d106c70e * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
they also block/unblock execution of asyncs and call
scm_async_click which is declared in async.h but threads.h can not
include async.h since async.h already includes threads.h.
(scm_i_critical_section_level): New, for checking mistakes in the
use of the SCM_CRITICAL_SECTION_* macros.
(scm_i_critical_section_mutex): Make it a recursive mutex so that
critical sections can be nested.

* threads.h, threads.c (scm_frame_lock_mutex): New.
(scm_frame_critical_section): Take mutex as argument.
(framed_critical_section_mutex): New, used as default for above.
(scm_init_threads): Initialize it.
(scm_threads_prehistory): Do not initialize thread_admin_mutex and
scm_i_critical_section_mutex; both are initialized statically.
2005-03-07 21:30:24 +00:00
Marius Vollmer
db6673e5a3 *** empty log message *** 2005-03-04 17:56:04 +00:00
Marius Vollmer
69d2000d93 Docstring updates. 2005-03-04 17:55:49 +00:00
Marius Vollmer
ba1b72235a (scm_try_mutex): Renamed argument for consistency. 2005-03-04 17:54:50 +00:00
Marius Vollmer
d0a45bfffd *** empty log message *** 2005-03-04 17:06:34 +00:00
Marius Vollmer
9eaf7f85dd (scm_call_with_dynamic_root): New docstring. 2005-03-04 17:06:19 +00:00
Marius Vollmer
de527efba5 Define _GNU_SOURCE. 2005-03-04 12:11:10 +00:00
Marius Vollmer
9de87eea47 See ChangeLog from 2005-03-02. 2005-03-02 20:42:01 +00:00
Marius Vollmer
cb1cfc42a4 (scm_frame_current_module): New. 2005-03-02 20:14:59 +00:00
Marius Vollmer
b5623573b4 (scm_primitive_load): Use scm_i_frame_current_load_port instead of
scm_internal_dynamic_wind.
2005-03-02 20:13:53 +00:00
Marius Vollmer
bf6de59d5b Removed obsolete comment. 2005-03-02 20:11:55 +00:00
Marius Vollmer
a41666e546 (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x): Use "!scm_is_eq"
instead of "!=".
2005-03-02 20:05:38 +00:00
Marius Vollmer
657bdfeae3 (SCM_I_GSC_USE_COOP_THREADS, SCM_USE_COOP_THREADS): Removed. 2005-03-02 19:58:26 +00:00
Marius Vollmer
731294434a (progargs_fluid): New.
(scm_program_arguments, scm_set_program_arguments): Use it instead
of scm_progargs.
(scm_init_feature): Allocate it.  Also, only add "threads" feature
when SCM_USE_PTHREAD_THREADS is true.
2005-03-02 19:40:20 +00:00
Marius Vollmer
5c6148424b Comment on #endif 2005-03-02 18:50:45 +00:00
Marius Vollmer
9b7952c06e * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
(libguile_la_SOURCES): Added null-threads.c
(EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
threads-plugin.c.
* pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
2005-03-02 16:41:01 +00:00
Marius Vollmer
ad3d5a65c8 *** empty log message *** 2005-02-27 23:52:04 +00:00
Marius Vollmer
1c80707c55 (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP
options.  Also, reorganized the code a bit for cleanliness.  Thanks to
Greg Troxel!
2005-02-27 23:50:30 +00:00
Mikael Djurfeldt
73a90115e6 Bugfix: Include <libguile.h> outside of the extern "C"
block.
2005-02-27 00:04:56 +00:00
Marius Vollmer
5d2cb3abcf *** empty log message *** 2005-02-25 22:36:07 +00:00
Marius Vollmer
5b58246699 (scm_i_rehash): Remove elements from old bucket vector
so that no two weak alist vectors share a spine.
(scm_hash_fn_create_handle_x): Deal with a possible rehashing
during GC before inserting the new alist cell.
2005-02-25 22:35:26 +00:00
Marius Vollmer
c2f21af5f8 (scm_i_rehash): Remove elements from old bucket vector so that no two
weak alist vectors share a spine.
2005-02-25 21:22:44 +00:00
Marius Vollmer
838c4126f5 *** empty log message *** 2005-02-23 17:24:38 +00:00
Marius Vollmer
bc6580eb22 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
the hashtable.
(scm_hash_fn_create_handle_x): Likewise.
* vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
2005-02-23 17:24:19 +00:00
Kevin Ryde
7d92d3d0da Add a copyright year. 2005-02-14 23:15:08 +00:00
Kevin Ryde
a9ad484720 In scm_difference, amend comment about normbig. 2005-02-14 23:14:35 +00:00
Mikael Djurfeldt
29fed193d3 (prototype_to_type): Bugfix: Don't compare prototype to
the prototypical examples mentioned in the old reference manual.
Instead keep the old semantics of dispatching on type.  (Yes, this
is extremely ugly, but the whole point of keeping the deprecated
interface is not to break old code.)
2005-02-10 11:15:50 +00:00
Mikael Djurfeldt
9cc490600c (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
scm_i_array_dims.
2005-02-08 18:58:37 +00:00
Kevin Ryde
8447f463ba *** empty log message *** 2005-01-27 23:04:05 +00:00
Kevin Ryde
788aca275f (scm_ash): Rewrite using shifts, much faster than
integer-expt and multiply/divide.  Inexacts and fractions no longer
supported (they happened to work before for left shifts, but not
right).  Don't really need inexacts and fractions, since ash is
documented as a "bitwise operation", and all the rest of those only
take exact integers.
2005-01-27 22:51:22 +00:00
Han-Wen Nienhuys
856fca7e70 * gc-card.c (scm_i_card_statistics): map structs, closures and
subrs to one tag.

* gc-card.c (scm_i_tag_name):  new function.
(scm_i_card_statistics): new function.
2005-01-27 22:50:09 +00:00
Han-Wen Nienhuys
73a4c24e41 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
(tag_table_to_type_alist): ignore unknown types.

* gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
statistics on the number of live objects of each type.

* gc-card.c (scm_i_tag_name):  new function.
(scm_i_card_statistics): new function.
2005-01-27 22:44:43 +00:00
Han-Wen Nienhuys
8b378a5f48 *** empty log message *** 2005-01-27 22:20:13 +00:00