* srfi-1.scm (filter, filter!): Removed. (Now implemented in the core.)
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
f8af5c6d
MD
12003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2
c614a00b
MD
3 * list.c, list.h (scm_filter, scm_filter_x): New functions.
4
109c2c9f
MD
5 * modules.c (scm_module_import_interface): New function.
6
f8af5c6d
MD
7 * goops.c, goops.h (scm_class_accessor_method): Renamed from
8 scm_class_accessor.
9 (scm_class_accessor): New class.
10
a48d60b1
MD
112003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
12
13 * goops.c (scm_primitive_generic_generic): Enable primitive
14 generic if not enabled.
15 (scm_sys_goops_loaded): Setup unextended primitive generics.
16
17 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
18
19 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
20 snarf macros.
21
22 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
23 testing example. All uses of SCM_GPROC should be converted.)
24
25 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
26 scm_assoc.
27
28 * eq.c (scm_equal_p): Turned into a primitive generic.
29
84edc049
RB
302003-02-27 Rob Browning <rlb@defaultvalue.org>
31
32 * Makefile.am (scmconfig.h): new target -- generate file from
33 ../config.h.
34 (modinclude_HEADERS): remove version.h.
35 (nodist_modinclude_HEADERS): add version.h.
36
ea5c9285
MD
372003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
38
b4a1358c
MD
39 This fixes a serious GC bug, introduced during the latest
40 reorganization of the GC, which disabled freeing of structs and
41 GOOPS objects:
42
43 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
44 SCM_EOL.
53af8255
MD
45 (scm_struct_prehistory): Move scm_free_structs to
46 scm_before_mark_c_hook.
ea5c9285 47
b4a1358c
MD
48 * gc-card.c (sweep_card): Check that we haven't swept structs on
49 this card before. That can happen if scm_i_sweep_all_segments has
50 been called from some other place than scm_igc.
51
c35738c1
MD
522003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
53
231a4ea8
MD
54 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
55 (since hash tables now adapt their size).
56
57 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
58 (current number of prehistory bindings; hashtable code will select
59 a prime which is greater than this value).
60
61 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
62 (current number of initial symbols).
63
64 * properties.c (scm_init_properties): Don't specify size of
65 scm_properties_whash.
66
67 * objprop.c (scm_init_objprop): Don't specify size of
68 scm_object_whash.
69
70 * keywords.c (scm_init_keywords): Don't specify a hash table size.
71
c35738c1
MD
72 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
73
74 The following changes introduce the use of resizable hash tables
75 throughout Guile. It also renames the old *-hash-table* functions
76 to *-alist-vector* and places them, together with the rest of the
77 weak vector support, in the module (ice-9 weak-vector). We should
78 probably introduce a new, better, API for weak references, for
79 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
80 look like and are used like ordinary pairs.)
81
82 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
83 leaf_environment_fold, obarray_remove_all): Use hashtable
84 accessors.
85
86 * gc.c (scm_init_storage): Moved hook initialization to
87 scm_storage_prehistory.
88 (scm_storage_prehistory): New function.
89 (scm_igc): Added commentary about placement of
90 scm_after_sweep_c_hook.
91
92 * gc-mark.c (scm_mark_all): Use hashtable accessors.
93 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
94 SCM_WVECT_WEAK_VALUE_P.
95
96 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
97 functions.
98 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
99 Removed.
100 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
101 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
102
103 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
104 calls to scm_storage_prehistory and scm_hashtab_prehistory.
105
106 * modules.c (module-reverse-lookup): Use hashtable accessors.
107
108 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
109
110 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
111 scm_make_weak_value_alist_vector,
112 scm_make_doubly_weak_alist_vector): New functions.
113
114 * weaks.c (scm_init_weaks_builtins): New function.
115
116 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
117 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
118 SCM_WVECT_NOSCAN_P): New macros.
119
120 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
121 and SCM_WVECT_WEAK_VALUE_P.
122
123 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
124 allocate_weak_vector and exported.
125
0a4c1355
MD
1262003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
127
128 * hashtab.c: Undid thread safety. (We decided that it's better to
129 let the user explicitly protect the tables (or not) according what
130 is suitable for the application.)
131
87ca11ff
MD
1322003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
133
134 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
135 thread safe and handle resizing tables.
136 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
137 SCM_DEFER/ALLOW_INTS.
138
f59a096e
MD
1392003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
140
141 * hashtab.c (scm_vector_to_hash_table,
142 scm_c_make_resizing_hash_table, scm_make_hash_table): New
143 functions.
144 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
145 safe and handle resizing tables.
146
147 * weaks.c (scm_make_weak_key_hash_table,
148 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
149 Size argument made optional. Return resizable table if not
150 specified.
151
4b612c5b
MD
1522003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
153
154 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
155 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
156
b3d7f6df
MD
1572003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
158
159 * debug.c (scm_procedure_source): Handle all objects for which
160 procedure? is #t. (Thanks to Bill Schottstaedt.)
161
756414cf
MD
1622003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
163
361d631f
MD
164 * futures.c (mark_futures): Don't need to mark data of recycled
165 futures.
166 (scan_futures, cleanup_undead): Be smarter about marking
167 futures---avoid unnecessary passes through future lists.
168
756414cf
MD
169 * futures.h, futures.c: New files; Introduced recycling of
170 futures. For fine-grained threading this lifts performance to
171 another level. We can now use parallelization in inner loops of
172 Guile programs without impossible overhead.
173
174 * threads.h, threads.c: Moved futures to their own file.
175
176 * Makefile.am (libguile_la_SOURCES): Added futures.c.
177 (DOT_X_FILES): Added futures.x.
178 (DOT_DOC_FILES): Added futures.doc.
179 (modinclude_HEADERS): Added futures.h.
180
181 * threads.c, threads.h (scm_i_create_thread): Renamed from
182 create_thread and made global.
183
184 * futures.c (scm_make_future): New procedure.
185
186 * eval.c: #include "libguile/futures.h".
187
188 * init.c: #include "futures.h"
189 (scm_init_guile_1): Call scm_init_futures.
190
191 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
192
193 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
194
195 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
196 functions.
197
198 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
199
b4debead
MD
2002003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
201
202 * threads.c (create_thread): Don't unwind dynwind chain of parent
203 thread before creation. Just start the new thread with an empty
204 dynwind chain.
205
93f26b7b
MD
2062003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
207
208 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
209
38d8927c
MD
2102003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
211
41c96c32
MD
212 * threads.c (scm_timed_wait_condition_variable): Support timed
213 waiting also for simple condition variables.
214
38d8927c
MD
215 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
216 of calling the procedure change-object-class.
217
9cf5d9b7
MD
2182003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
219
220 * ramap.c (scm_ramapc): Typo in error message.
221
bbf8d523
MD
2222003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
223
b46fae00
MD
224 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
225 slots with instance allocation.
226
bbf8d523
MD
227 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
228 class.
229 (scm_compute_applicable_methods): Use scm_generic_function_methods.
230
231 * goops.c (scm_generic_function_methods): Support extended
232 generic functions.
233
ebf9b47c
MD
2342002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
235
236 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 237 Thanks to Neil for pointing this out!
ebf9b47c 238
14a9ba3f
NJ
2392002-12-29 Neil Jerram <neil@ossau.uklinux.net>
240
241 * lang.h: Remove declarations matching definitions removed from
242 lang.c (just below).
243
c6a040a8
NJ
2442002-12-28 Neil Jerram <neil@ossau.uklinux.net>
245
6054d805
NJ
246 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
247 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
248 and already commented out.
249
c6a040a8
NJ
250 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
251 scm_lreadparen): Support reading vectors with Elisp syntax if
252 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
253 is not currently defined, and there isn't even a configure switch
254 to enable it yet.)
255
3742c12f
MV
2562002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
257
258 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
259 builds work.
260 (EXTRA_DIST): Added version.h.in.
261
fb50ef08
MD
2622002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
263
264 This change makes it possible for one thread to do lazy sweeping
265 while other threads are running. Now only the mark phase need to
266 have all threads asleep. We should look further into this issue.
267 Presently, I've put the locking of scm_i_sweep_mutex at
268 "conservative" places due to my current lack of knowledge about
269 the garbage collector. Please feel free to restrict these regions
270 further to allow for maximal parallelism!
271
272 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
273
274 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
275 scm_gc_register_collectable_memory): Substitute locking of
276 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
277 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
278 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
279 the single-thread section (which now only contains the mark
280 phase).
281 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
282 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
283
284 * threads.c (gc_section_mutex): Removed.
285
9ed24633
MD
2862002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
287
0d48aca5
MD
288 * threads.c (create_thread): Clear parent field in root state in
289 order not to unnecessarily remember dead threads.
290
9ed24633
MD
291 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
292 (scm_trampoline_1, scm_trampoline_2): Use them.
293
29717c89
MD
2942002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
295
296 Partial introduction of real plugin interface.
297
298 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
299 (EXTRA_DIST): Added threads-plugin.c.
300
301 * threads-plugin.h, threads-plugin.c: New files.
302
303 * threads.h: #include "libguile/threads-plugin.h".
304
305 * threads.c: #include "libguile/threads-plugin.c".
306
307 * pthread-threads.c: Temporarily remove debugging functions.
308
309 * threads.c, threads.h (scm_yield): Added back.
310
e29e0b09
MD
3112002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
312
313 * threads.c (really_launch): Detach before unlocking
314 thread_admin_mutex in order not to risk being joined.
315 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
316 thread_admin_mutex locked during GC.
317
318 * pthread-threads.c, pthread-threads.h: Improvements to debugging
319 functions.
320
0b6843b1 3212002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 322
6da2dfc4
MD
323 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
324 support for debugging mutex operations.
325
1b92fb6b
MD
326 * threads.c (scm_thread): Removed filed joining_threads.
327 (thread_print): Print thread number as well as address of thread
328 structure.
0b6843b1
MD
329 (scm_join_thread): Bugfix.
330 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
331 scm_timed_wait_condition_variable, scm_signal_condition_variable,
332 scm_broadcast_condition_variable): Use the low-level API.
333 (scm_all_threads): Return copy of thread list (to prevent
334 unintended destruction).
335 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 336
93cd4dcd
MD
337 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
338 pthread "native" recursive mutex support.
339
2ff4f181
MD
3402002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
341
28d52ebb
MD
342 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
343 Simply lock a thread C API recursive mutex.
344 (SCM_NONREC_CRITICAL_SECTION_START,
345 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
346 SCM_REC_CRITICAL_SECTION_END): Removed.
347
348 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
349 direct calls to scm_rec_mutex_lock / unlock around the three calls
350 to scm_m_expand_body.
351
352 * eval.c, eval.h (promise_free): New function.
353 (scm_force): Rewritten; Now thread-safe; Removed
354 SCM_DEFER/ALLOW_INTS.
355
356 * pthread-threads.h: Added partially implemented plugin interface
357 for recursive mutexes. These are, for now, only intended to be
358 used internally within the Guile implementation.
359
360 * pthread-threads.c: New file.
361
362 * threads.c: Conditionally #include "pthread-threads.c".
363
364 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
365 thread-safe;
366
367 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
368 SCM_GLOBAL_REC_MUTEX): New macros.
369
370 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
371 macros---use mutexes instead.
372
373 * tags.h (SCM_IM_FUTURE): New tag.
374
375 * eval.c (scm_m_future): New primitive macro.
376 (SCM_CEVAL): Support futures.
377 (unmemocopy): Support unmemoization of futures.
378
379 * print.c (scm_isymnames): Name of future isym.
380
2ff4f181
MD
381 * version.c: Unmade some changes to my private copy that got
382 committed by mistake.
383
392d2833
MD
3842002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
385
e200ddee
MD
386 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
387 2002-12-10.
388
392d2833
MD
389 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
390
391 * gc.c (scm_gc_sweep): Call it here instead, which is a more
392 logical place.
393
394 * threads.c (create_thread): Remember root object until the handle
395 of the new thread is on all_threads list.
396
397 * root.c (scm_make_root): Moved copying of fluids until after
398 creation of root handle so that the fluids are GC protected. Also
399 removed the critical section.
400
c4c52ebe
MD
4012002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
402
960c408c
MD
403 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
404
3cdde9d6 405 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 406 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
407 (scm_realloc): Serialize call to realloc
408 (scm_calloc): Same for calloc.
409 Thanks to Wolfgang Jaehrling!
410 (Now we have to make sure all calls to malloc/realloc are made
411 through scm_malloc.)
412
960c408c
MD
413 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
414
c4c52ebe
MD
415 * threads.c (really_launch): Release heap (to prevent deadlock).
416 (create_thread): Release heap before locking thread admin mutex.
417
b0dc3d71
MD
4182002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
419
420 * threads.c (scm_i_thread_invalidate_freelists): New
421 function.
422
423 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
424
425 * modules.c (scm_export): Inserted a return statement.
426
06e80f59
HWN
4272002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
428
429 * modules.c (scm_export): new function
430
431 * gc-card.c: add a note about malloc()/free() overhead.
432
a12611c3
MD
4332002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
434
435 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
436 in srcdir.
437
c7fabadf
MD
4382002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
439
440 These changes remove scm_ints_disabled (which hasn't has any
441 effect in Guile for quite some time).
442
443 * async.c, error.h (scm_ints_disabled): Removed.
444
445 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
446 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
447 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
448 (old_ints): Removed.
449
450 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
451 critical section.
452 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
453 SCM_ALLOW_INTS.
454
9bc4701c
MD
4552002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
456
52340b65
MD
457 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
458 Removed accidental #if 0 around these functions.
459
9bc4701c
MD
460 These changes are the start of support for preemptive
461 multithreading. Marius and I have agreed that I commit this code
462 into the repository although it isn't thoroughly tested and surely
463 introduces many bugs. The bugs should only be exposed when using
464 threads, though. Signalling and error handling for threads is
465 very likely broken. Work on making the implementation cleaner and
466 more efficient is needed.
467
468 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
469 (SCM_NONREC_CRITICAL_SECTION_START,
470 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
471 SCM_REC_CRITICAL_SECTION_END): New macros.
472 (SCM_CRITICAL_SECTION_START/END): Defined here.
473
474 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
475 the three calls to scm_m_expand_body.
476
477 * gc.h: #include "libguile/pthread-threads.h";
478 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
479
480 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
481 scm_t_key;
482
483 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
484 access.
485
486 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
487
488 * gc-freelist.c, threads.c (really_launch): Use
489 SCM_FREELIST_CREATE.
490
491 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
492
493 * gc.c (scm_i_expensive_validation_check, scm_gc,
494 scm_gc_for_newcell): Put threads to sleep before doing GC-related
495 heap administration so that those pieces of code are executed
496 single-threaded. We might consider rewriting these code sections
497 in terms of a "call_gc_code_singly_threaded" construct instead of
498 calling the pair of scm_i_thread_put_to_sleep () and
499 scm_i_thread_wake_up (). Also, we would want to have as many of
500 these sections eleminated.
501
502 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
503
504 * inline.h: #include "libguile/threads.h"
505
506 * pthread-threads.h: Macros now conform more closely to the
507 pthreads interface. Some of them now take a second argument.
508
509 * threads.c, threads.h: Many changes.
510
5112002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
512
513 * Makefile.am (version.h): Changed $^ --> $< in rule for
514 version.h.
515
b2cbe8d8
RB
5162002-12-08 Rob Browning <rlb@defaultvalue.org>
517
518 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
519 (SCM_MINOR_VERSION): use @--@ substitution now.
520 (SCM_MICRO_VERSION): use @--@ substitution now.
521 (scm_effective_version): new function prototype.
522
523 * version.c (scm_effective_version): new function, also add
524 effective-version.
525
526 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
527 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
528 SCM_LIBRARY_DIR.
529 (version.h): generate this here rather than configure.in. This
530 approach tracks source edits better (i.e. more immediately).
531 Might be worth considering for other .in files too.
532
5441c65c
MV
5332002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
534
535 Reorganized thread package selection. A thread package now only
536 implements a small set of pthread like functions and Guile
537 implements the rest on top of that. Guile's implementation is
538 what the "coop-pthreads" package has been previously. Support for
539 "coop" threads has been removed until I get time to add it again.
540
541 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
542 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
543 null-threads.c, coop-pthreads.c.
544 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
545 pthread-threads.h.
546
547 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
548
549 * threads.h: Do not include "libguile/coop-defs.h". Include
550 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
551 (previously deprecated) C level thread API prototypes. They are
552 now in the thread package specific headers, "null-threads.h" and
553 "pthread-threads.h".
554 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
555 New.
556 (scm_threads_init): Removed.
557 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
558 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
559 SCM_I_THREAD_SWITCH_COUNT): Define here.
560 (scm_single_thread_p): Removed.
561 (scm_call_with_new_thread): Take two args directly instead of list
562 of two args.
563 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
564 SCM_SET_THREAD_LOCAL_DATA): Define here.
565
566 * threads.c: Merged with "coop-pthreads.c".
567
568 * null-threads.h: Implement pthread-like API as a set of macros.
569
570 * pthread-threads.h: New, implement pthread-like API by deferring
571 to pthread itself.
572
573 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
574 has been lost in the reorganization.
575
504d99c5
MD
5762002-12-01 Mikael Djurfeldt <mdj@linnaeus>
577
578 The following change makes it possible to move procedure
579 application dispatch outside inner loops. The motivation was
580 clean implementation of efficient replacements of R5RS primitives
581 in SRFI-1.
582
583 The semantics is clear: scm_trampoline_N returns an optimized
584 version of scm_call_N (or NULL if the procedure isn't applicable
585 on N args).
586
587 Applying the optimization to map and for-each increases efficiency
588 noticeably. For example, (map abs ls) is 8 times faster than
589 before.
590
591 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
592
593 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
594
595 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
596 (map, for-each): Handle also application on two args as a special
597 case; Use trampolines.
598
599 Other changes:
600
601 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
602 (subr2oless): Removed.
603 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
604 vector GC protected.
605
606 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
607 scm_out_of_range.
608
63dd3413
DH
6092002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
610
611 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
612
4ba5f279
MD
6132002-11-17 Mikael Djurfeldt <mdj@linnaeus>
614
615 * debug.c (scm_make_iloc): Added missing "return".
616
56ae231f
MV
6172002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
618
619 * strports.c (scm_eval_string_in_module): Validate second arg to
620 be a module. Thanks to Arno Peters!
621
80b28865
DH
6222002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
623
624 * .cvsignore: remove goops.c
625
c88b1456
DH
6262002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
627
628 * modules.c (scm_env_top_level, scm_lookup_closure_module,
629 module_variable, scm_module_lookup_closure,
630 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
631 scm_system_module_env_p): Don't compare SCM values with C
632 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
633 over SCM_NFALSEP.
634
a8a19efc
DH
6352002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
636
637 * eval.h (SCM_MAKE_ILOC): New macro.
638
639 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
640 the iloc bitpattern here.
641
76734914
MD
6422002-11-14 Mikael Djurfeldt <mdj@linnaeus>
643
644 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
645 part of the API, otherwise it's difficult to write Guile
646 extensions using non-blocking I/O => moved #include
647 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
648
649 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
650 s_unlock_mutex.
651
8b5b4a75
MV
6522002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
653
654 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
655 are defined in configure.in.
656
657 * threads.c: Removed SCM_API from function definitions. SCM_API
658 is only for declarations.
659
e5a83084
MD
6602002-11-07 Mikael Djurfeldt <mdj@linnaeus>
661
9be8bb45
MD
662 * coop-pthreads.h: Added support for thread specific data to the
663 generic C API for the coop-pthreads case.
664
e5a83084
MD
665 * threads.c, threads.h (scm_cond_init): Undo unintentional API
666 change.
6c214b62 667 (scm_cond_broadcast): Added missing function.
e5a83084 668
7edf178e
MV
6692002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
670
671 * coop.c (coop_next_runnable_thread): Removed, wich should have
672 happened when GUILE_ISELECT was hard-wired.
673
7f5b1b77
MV
6742002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
675
7caa1b07
MV
676 * Makefile.am (libguile_la_SOURCES): Added threads.c
677 (DOT_DOC_FILES): Added threads.doc.
678 (DOT_X_FILES): Added threads.x.
679 (EXTRA_libguile_la_SOURCES): Removed threads.c.
680 (noinst_HEADERS): Added coop-pthreads.c.
681 (modinclude_HEADERS): Added coop-pthreads.h.
682
683 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
684 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
685
bb11cbf4
MV
686 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
687 Thanks to Bill Schottstaedt!
688
1d4cbbed
MV
689 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
690
7f5b1b77
MV
691 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
692 SCM_COPT_THREADS is defined.
693 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
694 is defined.
695
696 * coop-pthreads.c: Some harmless renamings of internal stuff.
697 (create_thread): New, generalized version of
698 scm_call_with_new_thread.
699 (scm_call_with_new_thread): Use it.
700 (scm_spawn_thread): New, use create_thread.
701
d52f53b1
MV
7022002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
703
704 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
705 start testing it now.
706
707 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
708 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
709 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
710 is defined.
711
30f920c3
MV
7122002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
713
714 * scmsigs.c (signal_cell_handlers, install_handler_data,
715 scm_delq_spine_x, really_install_handler, install_handler): New
716 scheme for triggering signal handlers, to simplify take_signal.
717 (take_signal): Simplified, to avoid race conditions.
718 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
719 hasn't exited yet.
720
721 * async.c (scm_async_click): Reset pending_asyncs, handle
722 signal_asyncs. Don't set cdr of a non-signal async to #f.
723 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
724 always. Set pending_asyncs.
725 (scm_system_async_mark_for_thread): Check that thread has not
726 exited.
727 (scm_unmask_signals, decrease_block): Call scm_async_click after
728 block_asyncs becomes zero.
729
730 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
731 active_asyncs.
732
733 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
734 fields.
735 * root.c (root_mark): Mark them.
736 (make_root): Initialize them.
737
738 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
739 USE_COOP_THREADS.
740 (scm_internal_select): Define one version for USE_COOP_THREADS and
741 one for USE_NULL_THREADS.
742 (scm_init_iselect): Likewise.
743
744 * inline.h (scm_cell, scm_double_cell): Also allow
745 USE_COPT_THREADS to not protect the slot initializers.
746
747 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
748 because threads need to be initialized before the stack, but
749 gsubrs such as scm_timed_condition_variable_wait can only be
750 created later.
751
752 * threads.h: Include "coop-pthreads.h" when requested.
753 (scm_threads_make_mutex, scm_threads_lock_mutex,
754 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
755 not implemented anyway.
756 (scm_init_thread_procs, scm_try_mutex,
757 scm_timed_condition_variable_wait,
758 scm_broadcast_condition_variable, scm_c_thread_exited_p,
759 scm_thread_exited_p): New prototypes.
760 (struct timespec): Define if not already defined.
761 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
762 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
763 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
764 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
765 deprecated.
766
767 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
768 requested.
769 (scm_thread_exited_p): New.
770 (scm_try_mutex, scm_broadcast_condition_variable): Newly
771 registered procedures.
772 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
773 Use the latter as the procedure for "wait-condition-variable",
774 thus offering a optional timeout parameter to Scheme.
775 (scm_wait_condition_variable): Implement in terms of
776 scm_timed_wait_condition_variable.
777 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
778 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
779 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
780 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
781 scm_make_mutex, etc, and deprecate.
782 (scm_init_threads): Do not create smobs, leave this to
783 scm_threads_init. Do not include "threads.x" file.
784 (scm_init_thread_procs): New, include "threads.x" here.
785
786 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
787 scm_null_mutex_lock, scm_null_mutex_unlock,
788 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
789 scm_null_condvar_wait, scm_null_condvar_signal,
790 scm_null_condvar_destroy): Removed.
791 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
792 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
793 scm_cond_destory): Do not define, they are now deprecated and
794 handled by threads.{h,c}.
795
796 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
797 (scm_threads_init): Create smobs here, using the appropriate
798 sizes.
799 (block): Removed, now unused.
800 (scm_c_thread_exited_p): New.
801 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
802 scm_null_mutex_destroy, scm_null_condvar_init,
803 scm_null_condvar_wait, scm_null_condvar_signal,
804 scm_null_condvar_destroy): Removed and updated users to do their
805 task directly.
806 (scm_try_mutex, timeval_subtract,
807 scm_timed_wait_condition_variable,
808 scm_broadcast_condition_variable): New.
809 (scm_wait_condition_variable): Removed.
810
811 * coop-defs.h (coop_m): Added 'level' field.
812 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
813 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
814 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
815 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
816 define.
817 (coop_condition_variable_broadcast): New.
818
819 * coop-threads.c (scm_threads_init): Create smobs here, using the
820 appropriate sizes.
821 (scm_c_thread_exited_p, scm_try_mutex,
822 scm_timed_wait_condition_variable,
823 scm_broadcast_condition_variable): New.
824 (scm_wait_condition_variable): Removed.
825
826 * coop.c (coop_new_mutex_init): Initialize level.
827 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
828 level.
829 (coop_condition_variable_signal): Renamed to
830 coop_condition_variable_broadcast and reimplemented in terms of
831 that. Thus...
832 (coop_condition_variable_broadcast): New.
833
834 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
835
836 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
837
087ed40d
MV
8382002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
839
65a23095
MV
840 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
841 of system headers.
842
087ed40d
MV
843 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
844 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 845 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 846
5ec1d2c8
DH
8472002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
848
849 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
850 scm_definedp to scm_defined_p and deprecated scm_definedp.
851
100ae50d
DH
8522002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
853
854 * async.h, async.c (scm_system_async): Fixed deprecation to work
855 correctly when deprecated features are excluded.
856
2794cb50
MV
8572002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
858
859 * async.c (scm_system_async_mark_for_thread): Validate thread
860 argument.
861
862 * coop-threads.c (scm_i_thread_root): Do not validate argument.
863
864 * feature.c (scm_init_feature): Don't add 'threads' for
865 USE_NULL_THREADS.
866
867 * inline.h (scm_cell, scm_double_cell): Also allow
868 USE_NULL_THREADS to not protect the slot initializers.
869
870 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
871 "USE_THREAD".
872
873 * Makefile.am (noinst_HEADERS): Added null-threads.c.
874 (modinclude_HEADERS): Added null-threads.h.
875
876 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
877 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
878 (scm_init_threads): Use generic type names scm_t_mutex and
879 scm_t_cond instead of coop_m and coop_c.
880
881 * null-threads.c, null-threads.h: New files.
882
ff810d7a
MV
8832002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
884
885 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
886 This is to support makes that know about "$<" only in pattern
887 rules, like Sun's make.
888
a90bdb73
MV
8892002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
890
891 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
892 substitution. Thanks to David Allouche!
893
e71a8bf2
DH
8942002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
895
896 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
897 !SCM_ENABLE_DEPRECATED.
898
41f77ff5
MV
8992002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
900
504d99c5 901 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
902 scm_i_thread_root when USE_THREADS is defined. Use scm_root
903 otherwise.
904
905 * scmsigs.c (take_signal): Only call scm_i_thread_root when
906 USE_THREADS is defined. Use scm_root otherwise.
907 (scm_sigaction_for_thread): Ignore THREAD argument when
908 USE_THREADS is not defined. Also, move THREAD argument defaulting
909 out of HAVE_SIGACTION section, which was a bug.
910
6d16b125
MV
9112002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
912
913 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
914 signal_handlers, not the closure that is used as the async.
915 The closure is stored in signal_handler_cells, as previously.
916
acfa1f52
MV
9172002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
918
919 * root.h (scm_root_state): Added 'block_async' slot.
920 (scm_active_asyncs): Removed abbrev.
921 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
922
923 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
924 abbrev.
925
926 * async.h (scm_call_with_blocked_asyncs,
927 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
928 scm_c_call_with_unblocked_asyncs): New prototypes.
929 (scm_mask_signals, scm_unmask_signals): Deprecated.
930 (scm_mask_ints): Turned into a macro.
931 * async.c (scm_mask_ints): Removed.
932 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
933 this should not be necessary.
934 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
935 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
936 deprecation warning and check for errornous use. Set block_asyncs
937 instead of scm_mask_ints.
938 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
939 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
940 scm_c_call_with_unblocked_asyncs): New.
941
942 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
943 Asyncs are enabled by default.
944
34010f56
NJ
9452002-10-09 Neil Jerram <neil@ossau.uklinux.net>
946
947 * vports.c (scm_make_soft_port): Allow vector argument to carry a
948 6th element: an input waiting thunk.
949 (sf_input_waiting): New.
950
9310d6f2
MV
9512002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
952
953 * root.c (root_mark): Mark active_asyncs slot.
954
955 * async.c (scm_async_click): Set the cdr of a executed handler
956 cell to SCM_BOOL_F, not SCM_EOL.
957 (scm_i_queue_async_cell): Queue the cell at the end of the list,
958 and only if the handler procedure is not already present.
959 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
960 with SCM_BOOL_F.
961 * scmsigs.c (scm_sigaction_for_thread): Likewise.
962
ac48c719
RB
9632002-10-04 Rob Browning <rlb@defaultvalue.org>
964
1360a142
RB
965 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
966
967 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
968 scm_lt_dlopenext, and scm_lt_dlerror.
969 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
970 and scm_lt_dlerror.
971 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
972 and scm_lt_dlerror.
973 (sysdep_dynl_init): switch to scm_lt_dlinit();
974
975 * Makefile.am (libguile_la_LIBADD): switch to use
976 libguile-ltdl.la.
977
504d99c5 978 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 979
497092c9
MV
9802002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
981
982 * scmsigs.h (scm_sigaction_for_thread): New prototype.
983 * scmsigs.c (got_signal): Removed.
984 (signal_handler_cells, signal_handler_threads): New.
985 (take_signal): Queue the cell of the signal for the specified
986 thread. Reset the signal handler on systems that don't have
987 sigaction.
988 (sys_deliver_signals): Removed.
989 (close_1): New.
990 (scm_sigaction_for_thread): Renamed from scm_sigaction and
991 extended to also set the thread of a signal and allocate a cell
992 for it. Keep the Scheme name "sigaction". Check that signum is
993 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
994 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
995 (scm_init_scmsigs): Allocate signal_handler_cells and
996 signal_handler_threads vectors.
997
998 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
999 that system asnycs and user asyncs are separated. Reimplemented
1000 system asyncs to work per-thread.
1001
1002 * gc.c (scm_init_gc): Do not use scm_system_async.
1003
1004 * async.h (scm_asyncs_pending, scm_set_tick_rate,
1005 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
1006 Removed prototypes.
1007 (scm_i_queue_async_cell): New.
1008
1009 * __scm.h (scm_asyncs_pending_p): Removed.
1010 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
1011 scm_asyncs_pending_p.
1012
1013 * async.h (scm_system_async_mark_for_thread): New prototype.
1014
1015 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
1016
1017 * root.h (scm_root_state): Added new "active_asyncs" slot.
1018 * root.c (scm_make_root): Initialize it to SCM_EOL.
1019
1020 * coop-defs.h (coop_t): Added new "handle" slot.
1021 * coop-threads.c (all_threads, scm_current_thread,
1022 scm_all_threads, scm_i_thread_root): New.
1023 (scm_threads_init): Add main thread to all_threads.
1024 (scheme_launch_thread): Remove thread from all_threads when it
1025 terminates.
1026 (scm_call_with_new_thread): Initialize handle slot of coop_t
1027 structure and add new thread to all_threads.
1028 (scm_spawn_thread): Likewise.
1029
1030 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
1031 * threads.c (scm_current_thread, scm_all_threads): Register as
1032 primitives.
1033
1034 * dynl.c: Use scm_lt_ prefix for libltdl functions.
1035
480fa28d
NJ
10362002-09-29 Neil Jerram <neil@ossau.uklinux.net>
1037
1038 * script.c (scm_compile_shell_switches): Fix bad spelling of
1039 `explicitly' in comment.
1040
10412002-09-28 Neil Jerram <neil@ossau.uklinux.net>
1042
1043 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
1044 Refer to provided? in doc string rather than deprecated feature?.
1045
3553e1d1
GH
10462002-09-24 Gary Houston <ghouston@arglist.com>
1047
1048 * inline.h (scm_double_cell): prevent reordering of statements
1049 with any following code (for GCC 3 strict-aliasing).
1050 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
1051 the earlier version of the reordering prevention.
1052
4ad0814a
HWN
10532002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1054
1055 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
1056
e88e4f2e
HWN
10572002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1058
1059 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
1060 protection.
1061
1e71eafb
HWN
10622002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1063
1064 * inline.h: include stdio.h
1065
1066 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
1067
61ef9c1f
HWN
10682002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1069
dac04e9f
HWN
1070 * gc-segment.c (scm_i_make_initial_segment): check user settings
1071 for sanity.
1072
1073 * gc-malloc.c (scm_gc_init_malloc): check user settings for
1074 sanity.
dac04e9f
HWN
1075
1076 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
1077
ffd72400
HWN
1078 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
1079
1080 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
1081 these won't ever wrap around with high memory usage. Thanks to
1082 Sven Hartrumpf for finding this.
ffd72400 1083
5bd4a949
HWN
1084 * gc-freelist.c: include <stdio.h>
1085
61ef9c1f
HWN
1086 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
1087
ffd0ef3b
MV
10882002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
1089
a27e3d14
MV
1090 * vectors.h (SCM_VECTOR_REF): New.
1091
ffd0ef3b
MV
1092 * snarf.h (SCM_DEFINE_PUBLIC): New.
1093
f8a1712b
MV
10942002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
1095
1096 * socket.c (scm_addr_vector): Added size of address to arguments.
1097 Use it to avoid accessing a non-existent path in a sockaddr_un.
1098 Changed all callers.
1099
7200a36b
HWN
11002002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1101
1383773b
HWN
1102 * gc.h: remove DOUBLECELL card flags.
1103
1104 * gc-malloc.c (scm_calloc): try to use calloc() before calling
1105 scm_realloc().
1106
1107 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
1108 init loop; handle this from scm_init_card_freelist()
1109
1110 * gc-card.c (scm_init_card_freelist): init bit vector here.
1111
7200a36b 1112 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 1113 num2float.i.c (FLOAT2NUM): idem
7200a36b 1114
9981de3a
HWN
11152002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1116
1117 * eval.h: prepend libguile/ to include path
1118
19647556
MV
11192002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
1120
1121 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
1122