* version.c: Unmade some changes to my private copy that got
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
2ff4f181
MD
12002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2
3 * version.c: Unmade some changes to my private copy that got
4 committed by mistake.
5
392d2833
MD
62002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
7
e200ddee
MD
8 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
9 2002-12-10.
10
392d2833
MD
11 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
12
13 * gc.c (scm_gc_sweep): Call it here instead, which is a more
14 logical place.
15
16 * threads.c (create_thread): Remember root object until the handle
17 of the new thread is on all_threads list.
18
19 * root.c (scm_make_root): Moved copying of fluids until after
20 creation of root handle so that the fluids are GC protected. Also
21 removed the critical section.
22
c4c52ebe
MD
232002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
24
960c408c
MD
25 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
26
3cdde9d6 27 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 28 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
29 (scm_realloc): Serialize call to realloc
30 (scm_calloc): Same for calloc.
31 Thanks to Wolfgang Jaehrling!
32 (Now we have to make sure all calls to malloc/realloc are made
33 through scm_malloc.)
34
960c408c
MD
35 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
36
c4c52ebe
MD
37 * threads.c (really_launch): Release heap (to prevent deadlock).
38 (create_thread): Release heap before locking thread admin mutex.
39
b0dc3d71
MD
402002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
41
42 * threads.c (scm_i_thread_invalidate_freelists): New
43 function.
44
45 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
46
47 * modules.c (scm_export): Inserted a return statement.
48
06e80f59
HWN
492002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
50
51 * modules.c (scm_export): new function
52
53 * gc-card.c: add a note about malloc()/free() overhead.
54
a12611c3
MD
552002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
56
57 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
58 in srcdir.
59
c7fabadf
MD
602002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
61
62 These changes remove scm_ints_disabled (which hasn't has any
63 effect in Guile for quite some time).
64
65 * async.c, error.h (scm_ints_disabled): Removed.
66
67 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
68 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
69 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
70 (old_ints): Removed.
71
72 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
73 critical section.
74 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
75 SCM_ALLOW_INTS.
76
9bc4701c
MD
772002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
78
52340b65
MD
79 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
80 Removed accidental #if 0 around these functions.
81
9bc4701c
MD
82 These changes are the start of support for preemptive
83 multithreading. Marius and I have agreed that I commit this code
84 into the repository although it isn't thoroughly tested and surely
85 introduces many bugs. The bugs should only be exposed when using
86 threads, though. Signalling and error handling for threads is
87 very likely broken. Work on making the implementation cleaner and
88 more efficient is needed.
89
90 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
91 (SCM_NONREC_CRITICAL_SECTION_START,
92 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
93 SCM_REC_CRITICAL_SECTION_END): New macros.
94 (SCM_CRITICAL_SECTION_START/END): Defined here.
95
96 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
97 the three calls to scm_m_expand_body.
98
99 * gc.h: #include "libguile/pthread-threads.h";
100 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
101
102 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
103 scm_t_key;
104
105 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
106 access.
107
108 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
109
110 * gc-freelist.c, threads.c (really_launch): Use
111 SCM_FREELIST_CREATE.
112
113 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
114
115 * gc.c (scm_i_expensive_validation_check, scm_gc,
116 scm_gc_for_newcell): Put threads to sleep before doing GC-related
117 heap administration so that those pieces of code are executed
118 single-threaded. We might consider rewriting these code sections
119 in terms of a "call_gc_code_singly_threaded" construct instead of
120 calling the pair of scm_i_thread_put_to_sleep () and
121 scm_i_thread_wake_up (). Also, we would want to have as many of
122 these sections eleminated.
123
124 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
125
126 * inline.h: #include "libguile/threads.h"
127
128 * pthread-threads.h: Macros now conform more closely to the
129 pthreads interface. Some of them now take a second argument.
130
131 * threads.c, threads.h: Many changes.
132
1332002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
134
135 * Makefile.am (version.h): Changed $^ --> $< in rule for
136 version.h.
137
b2cbe8d8
RB
1382002-12-08 Rob Browning <rlb@defaultvalue.org>
139
140 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
141 (SCM_MINOR_VERSION): use @--@ substitution now.
142 (SCM_MICRO_VERSION): use @--@ substitution now.
143 (scm_effective_version): new function prototype.
144
145 * version.c (scm_effective_version): new function, also add
146 effective-version.
147
148 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
149 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
150 SCM_LIBRARY_DIR.
151 (version.h): generate this here rather than configure.in. This
152 approach tracks source edits better (i.e. more immediately).
153 Might be worth considering for other .in files too.
154
5441c65c
MV
1552002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
156
157 Reorganized thread package selection. A thread package now only
158 implements a small set of pthread like functions and Guile
159 implements the rest on top of that. Guile's implementation is
160 what the "coop-pthreads" package has been previously. Support for
161 "coop" threads has been removed until I get time to add it again.
162
163 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
164 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
165 null-threads.c, coop-pthreads.c.
166 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
167 pthread-threads.h.
168
169 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
170
171 * threads.h: Do not include "libguile/coop-defs.h". Include
172 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
173 (previously deprecated) C level thread API prototypes. They are
174 now in the thread package specific headers, "null-threads.h" and
175 "pthread-threads.h".
176 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
177 New.
178 (scm_threads_init): Removed.
179 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
180 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
181 SCM_I_THREAD_SWITCH_COUNT): Define here.
182 (scm_single_thread_p): Removed.
183 (scm_call_with_new_thread): Take two args directly instead of list
184 of two args.
185 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
186 SCM_SET_THREAD_LOCAL_DATA): Define here.
187
188 * threads.c: Merged with "coop-pthreads.c".
189
190 * null-threads.h: Implement pthread-like API as a set of macros.
191
192 * pthread-threads.h: New, implement pthread-like API by deferring
193 to pthread itself.
194
195 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
196 has been lost in the reorganization.
197
504d99c5
MD
1982002-12-01 Mikael Djurfeldt <mdj@linnaeus>
199
200 The following change makes it possible to move procedure
201 application dispatch outside inner loops. The motivation was
202 clean implementation of efficient replacements of R5RS primitives
203 in SRFI-1.
204
205 The semantics is clear: scm_trampoline_N returns an optimized
206 version of scm_call_N (or NULL if the procedure isn't applicable
207 on N args).
208
209 Applying the optimization to map and for-each increases efficiency
210 noticeably. For example, (map abs ls) is 8 times faster than
211 before.
212
213 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
214
215 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
216
217 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
218 (map, for-each): Handle also application on two args as a special
219 case; Use trampolines.
220
221 Other changes:
222
223 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
224 (subr2oless): Removed.
225 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
226 vector GC protected.
227
228 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
229 scm_out_of_range.
230
63dd3413
DH
2312002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
232
233 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
234
4ba5f279
MD
2352002-11-17 Mikael Djurfeldt <mdj@linnaeus>
236
237 * debug.c (scm_make_iloc): Added missing "return".
238
56ae231f
MV
2392002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
240
241 * strports.c (scm_eval_string_in_module): Validate second arg to
242 be a module. Thanks to Arno Peters!
243
80b28865
DH
2442002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
245
246 * .cvsignore: remove goops.c
247
c88b1456
DH
2482002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
249
250 * modules.c (scm_env_top_level, scm_lookup_closure_module,
251 module_variable, scm_module_lookup_closure,
252 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
253 scm_system_module_env_p): Don't compare SCM values with C
254 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
255 over SCM_NFALSEP.
256
a8a19efc
DH
2572002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
258
259 * eval.h (SCM_MAKE_ILOC): New macro.
260
261 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
262 the iloc bitpattern here.
263
76734914
MD
2642002-11-14 Mikael Djurfeldt <mdj@linnaeus>
265
266 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
267 part of the API, otherwise it's difficult to write Guile
268 extensions using non-blocking I/O => moved #include
269 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
270
271 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
272 s_unlock_mutex.
273
8b5b4a75
MV
2742002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
275
276 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
277 are defined in configure.in.
278
279 * threads.c: Removed SCM_API from function definitions. SCM_API
280 is only for declarations.
281
e5a83084
MD
2822002-11-07 Mikael Djurfeldt <mdj@linnaeus>
283
9be8bb45
MD
284 * coop-pthreads.h: Added support for thread specific data to the
285 generic C API for the coop-pthreads case.
286
e5a83084
MD
287 * threads.c, threads.h (scm_cond_init): Undo unintentional API
288 change.
6c214b62 289 (scm_cond_broadcast): Added missing function.
e5a83084 290
7edf178e
MV
2912002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
292
293 * coop.c (coop_next_runnable_thread): Removed, wich should have
294 happened when GUILE_ISELECT was hard-wired.
295
7f5b1b77
MV
2962002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
297
7caa1b07
MV
298 * Makefile.am (libguile_la_SOURCES): Added threads.c
299 (DOT_DOC_FILES): Added threads.doc.
300 (DOT_X_FILES): Added threads.x.
301 (EXTRA_libguile_la_SOURCES): Removed threads.c.
302 (noinst_HEADERS): Added coop-pthreads.c.
303 (modinclude_HEADERS): Added coop-pthreads.h.
304
305 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
306 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
307
bb11cbf4
MV
308 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
309 Thanks to Bill Schottstaedt!
310
1d4cbbed
MV
311 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
312
7f5b1b77
MV
313 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
314 SCM_COPT_THREADS is defined.
315 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
316 is defined.
317
318 * coop-pthreads.c: Some harmless renamings of internal stuff.
319 (create_thread): New, generalized version of
320 scm_call_with_new_thread.
321 (scm_call_with_new_thread): Use it.
322 (scm_spawn_thread): New, use create_thread.
323
d52f53b1
MV
3242002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
325
326 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
327 start testing it now.
328
329 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
330 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
331 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
332 is defined.
333
30f920c3
MV
3342002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
335
336 * scmsigs.c (signal_cell_handlers, install_handler_data,
337 scm_delq_spine_x, really_install_handler, install_handler): New
338 scheme for triggering signal handlers, to simplify take_signal.
339 (take_signal): Simplified, to avoid race conditions.
340 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
341 hasn't exited yet.
342
343 * async.c (scm_async_click): Reset pending_asyncs, handle
344 signal_asyncs. Don't set cdr of a non-signal async to #f.
345 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
346 always. Set pending_asyncs.
347 (scm_system_async_mark_for_thread): Check that thread has not
348 exited.
349 (scm_unmask_signals, decrease_block): Call scm_async_click after
350 block_asyncs becomes zero.
351
352 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
353 active_asyncs.
354
355 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
356 fields.
357 * root.c (root_mark): Mark them.
358 (make_root): Initialize them.
359
360 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
361 USE_COOP_THREADS.
362 (scm_internal_select): Define one version for USE_COOP_THREADS and
363 one for USE_NULL_THREADS.
364 (scm_init_iselect): Likewise.
365
366 * inline.h (scm_cell, scm_double_cell): Also allow
367 USE_COPT_THREADS to not protect the slot initializers.
368
369 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
370 because threads need to be initialized before the stack, but
371 gsubrs such as scm_timed_condition_variable_wait can only be
372 created later.
373
374 * threads.h: Include "coop-pthreads.h" when requested.
375 (scm_threads_make_mutex, scm_threads_lock_mutex,
376 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
377 not implemented anyway.
378 (scm_init_thread_procs, scm_try_mutex,
379 scm_timed_condition_variable_wait,
380 scm_broadcast_condition_variable, scm_c_thread_exited_p,
381 scm_thread_exited_p): New prototypes.
382 (struct timespec): Define if not already defined.
383 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
384 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
385 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
386 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
387 deprecated.
388
389 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
390 requested.
391 (scm_thread_exited_p): New.
392 (scm_try_mutex, scm_broadcast_condition_variable): Newly
393 registered procedures.
394 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
395 Use the latter as the procedure for "wait-condition-variable",
396 thus offering a optional timeout parameter to Scheme.
397 (scm_wait_condition_variable): Implement in terms of
398 scm_timed_wait_condition_variable.
399 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
400 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
401 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
402 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
403 scm_make_mutex, etc, and deprecate.
404 (scm_init_threads): Do not create smobs, leave this to
405 scm_threads_init. Do not include "threads.x" file.
406 (scm_init_thread_procs): New, include "threads.x" here.
407
408 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
409 scm_null_mutex_lock, scm_null_mutex_unlock,
410 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
411 scm_null_condvar_wait, scm_null_condvar_signal,
412 scm_null_condvar_destroy): Removed.
413 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
414 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
415 scm_cond_destory): Do not define, they are now deprecated and
416 handled by threads.{h,c}.
417
418 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
419 (scm_threads_init): Create smobs here, using the appropriate
420 sizes.
421 (block): Removed, now unused.
422 (scm_c_thread_exited_p): New.
423 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
424 scm_null_mutex_destroy, scm_null_condvar_init,
425 scm_null_condvar_wait, scm_null_condvar_signal,
426 scm_null_condvar_destroy): Removed and updated users to do their
427 task directly.
428 (scm_try_mutex, timeval_subtract,
429 scm_timed_wait_condition_variable,
430 scm_broadcast_condition_variable): New.
431 (scm_wait_condition_variable): Removed.
432
433 * coop-defs.h (coop_m): Added 'level' field.
434 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
435 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
436 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
437 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
438 define.
439 (coop_condition_variable_broadcast): New.
440
441 * coop-threads.c (scm_threads_init): Create smobs here, using the
442 appropriate sizes.
443 (scm_c_thread_exited_p, scm_try_mutex,
444 scm_timed_wait_condition_variable,
445 scm_broadcast_condition_variable): New.
446 (scm_wait_condition_variable): Removed.
447
448 * coop.c (coop_new_mutex_init): Initialize level.
449 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
450 level.
451 (coop_condition_variable_signal): Renamed to
452 coop_condition_variable_broadcast and reimplemented in terms of
453 that. Thus...
454 (coop_condition_variable_broadcast): New.
455
456 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
457
458 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
459
087ed40d
MV
4602002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
461
65a23095
MV
462 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
463 of system headers.
464
087ed40d
MV
465 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
466 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 467 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 468
5ec1d2c8
DH
4692002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
470
471 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
472 scm_definedp to scm_defined_p and deprecated scm_definedp.
473
100ae50d
DH
4742002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
475
476 * async.h, async.c (scm_system_async): Fixed deprecation to work
477 correctly when deprecated features are excluded.
478
2794cb50
MV
4792002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
480
481 * async.c (scm_system_async_mark_for_thread): Validate thread
482 argument.
483
484 * coop-threads.c (scm_i_thread_root): Do not validate argument.
485
486 * feature.c (scm_init_feature): Don't add 'threads' for
487 USE_NULL_THREADS.
488
489 * inline.h (scm_cell, scm_double_cell): Also allow
490 USE_NULL_THREADS to not protect the slot initializers.
491
492 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
493 "USE_THREAD".
494
495 * Makefile.am (noinst_HEADERS): Added null-threads.c.
496 (modinclude_HEADERS): Added null-threads.h.
497
498 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
499 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
500 (scm_init_threads): Use generic type names scm_t_mutex and
501 scm_t_cond instead of coop_m and coop_c.
502
503 * null-threads.c, null-threads.h: New files.
504
ff810d7a
MV
5052002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
506
507 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
508 This is to support makes that know about "$<" only in pattern
509 rules, like Sun's make.
510
a90bdb73
MV
5112002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
512
513 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
514 substitution. Thanks to David Allouche!
515
e71a8bf2
DH
5162002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
517
518 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
519 !SCM_ENABLE_DEPRECATED.
520
41f77ff5
MV
5212002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
522
504d99c5 523 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
524 scm_i_thread_root when USE_THREADS is defined. Use scm_root
525 otherwise.
526
527 * scmsigs.c (take_signal): Only call scm_i_thread_root when
528 USE_THREADS is defined. Use scm_root otherwise.
529 (scm_sigaction_for_thread): Ignore THREAD argument when
530 USE_THREADS is not defined. Also, move THREAD argument defaulting
531 out of HAVE_SIGACTION section, which was a bug.
532
6d16b125
MV
5332002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
534
535 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
536 signal_handlers, not the closure that is used as the async.
537 The closure is stored in signal_handler_cells, as previously.
538
acfa1f52
MV
5392002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
540
541 * root.h (scm_root_state): Added 'block_async' slot.
542 (scm_active_asyncs): Removed abbrev.
543 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
544
545 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
546 abbrev.
547
548 * async.h (scm_call_with_blocked_asyncs,
549 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
550 scm_c_call_with_unblocked_asyncs): New prototypes.
551 (scm_mask_signals, scm_unmask_signals): Deprecated.
552 (scm_mask_ints): Turned into a macro.
553 * async.c (scm_mask_ints): Removed.
554 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
555 this should not be necessary.
556 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
557 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
558 deprecation warning and check for errornous use. Set block_asyncs
559 instead of scm_mask_ints.
560 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
561 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
562 scm_c_call_with_unblocked_asyncs): New.
563
564 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
565 Asyncs are enabled by default.
566
34010f56
NJ
5672002-10-09 Neil Jerram <neil@ossau.uklinux.net>
568
569 * vports.c (scm_make_soft_port): Allow vector argument to carry a
570 6th element: an input waiting thunk.
571 (sf_input_waiting): New.
572
9310d6f2
MV
5732002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
574
575 * root.c (root_mark): Mark active_asyncs slot.
576
577 * async.c (scm_async_click): Set the cdr of a executed handler
578 cell to SCM_BOOL_F, not SCM_EOL.
579 (scm_i_queue_async_cell): Queue the cell at the end of the list,
580 and only if the handler procedure is not already present.
581 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
582 with SCM_BOOL_F.
583 * scmsigs.c (scm_sigaction_for_thread): Likewise.
584
ac48c719
RB
5852002-10-04 Rob Browning <rlb@defaultvalue.org>
586
1360a142
RB
587 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
588
589 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
590 scm_lt_dlopenext, and scm_lt_dlerror.
591 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
592 and scm_lt_dlerror.
593 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
594 and scm_lt_dlerror.
595 (sysdep_dynl_init): switch to scm_lt_dlinit();
596
597 * Makefile.am (libguile_la_LIBADD): switch to use
598 libguile-ltdl.la.
599
504d99c5 600 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 601
497092c9
MV
6022002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
603
604 * scmsigs.h (scm_sigaction_for_thread): New prototype.
605 * scmsigs.c (got_signal): Removed.
606 (signal_handler_cells, signal_handler_threads): New.
607 (take_signal): Queue the cell of the signal for the specified
608 thread. Reset the signal handler on systems that don't have
609 sigaction.
610 (sys_deliver_signals): Removed.
611 (close_1): New.
612 (scm_sigaction_for_thread): Renamed from scm_sigaction and
613 extended to also set the thread of a signal and allocate a cell
614 for it. Keep the Scheme name "sigaction". Check that signum is
615 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
616 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
617 (scm_init_scmsigs): Allocate signal_handler_cells and
618 signal_handler_threads vectors.
619
620 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
621 that system asnycs and user asyncs are separated. Reimplemented
622 system asyncs to work per-thread.
623
624 * gc.c (scm_init_gc): Do not use scm_system_async.
625
626 * async.h (scm_asyncs_pending, scm_set_tick_rate,
627 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
628 Removed prototypes.
629 (scm_i_queue_async_cell): New.
630
631 * __scm.h (scm_asyncs_pending_p): Removed.
632 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
633 scm_asyncs_pending_p.
634
635 * async.h (scm_system_async_mark_for_thread): New prototype.
636
637 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
638
639 * root.h (scm_root_state): Added new "active_asyncs" slot.
640 * root.c (scm_make_root): Initialize it to SCM_EOL.
641
642 * coop-defs.h (coop_t): Added new "handle" slot.
643 * coop-threads.c (all_threads, scm_current_thread,
644 scm_all_threads, scm_i_thread_root): New.
645 (scm_threads_init): Add main thread to all_threads.
646 (scheme_launch_thread): Remove thread from all_threads when it
647 terminates.
648 (scm_call_with_new_thread): Initialize handle slot of coop_t
649 structure and add new thread to all_threads.
650 (scm_spawn_thread): Likewise.
651
652 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
653 * threads.c (scm_current_thread, scm_all_threads): Register as
654 primitives.
655
656 * dynl.c: Use scm_lt_ prefix for libltdl functions.
657
480fa28d
NJ
6582002-09-29 Neil Jerram <neil@ossau.uklinux.net>
659
660 * script.c (scm_compile_shell_switches): Fix bad spelling of
661 `explicitly' in comment.
662
6632002-09-28 Neil Jerram <neil@ossau.uklinux.net>
664
665 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
666 Refer to provided? in doc string rather than deprecated feature?.
667
3553e1d1
GH
6682002-09-24 Gary Houston <ghouston@arglist.com>
669
670 * inline.h (scm_double_cell): prevent reordering of statements
671 with any following code (for GCC 3 strict-aliasing).
672 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
673 the earlier version of the reordering prevention.
674
4ad0814a
HWN
6752002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
676
677 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
678
e88e4f2e
HWN
6792002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
680
681 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
682 protection.
683
1e71eafb
HWN
6842002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
685
686 * inline.h: include stdio.h
687
688 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
689
61ef9c1f
HWN
6902002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
691
dac04e9f
HWN
692 * gc-segment.c (scm_i_make_initial_segment): check user settings
693 for sanity.
694
695 * gc-malloc.c (scm_gc_init_malloc): check user settings for
696 sanity.
dac04e9f
HWN
697
698 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
699
ffd72400
HWN
700 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
701
702 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
703 these won't ever wrap around with high memory usage. Thanks to
704 Sven Hartrumpf for finding this.
ffd72400 705
5bd4a949
HWN
706 * gc-freelist.c: include <stdio.h>
707
61ef9c1f
HWN
708 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
709
ffd0ef3b
MV
7102002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
711
a27e3d14
MV
712 * vectors.h (SCM_VECTOR_REF): New.
713
ffd0ef3b
MV
714 * snarf.h (SCM_DEFINE_PUBLIC): New.
715
f8a1712b
MV
7162002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
717
718 * socket.c (scm_addr_vector): Added size of address to arguments.
719 Use it to avoid accessing a non-existent path in a sockaddr_un.
720 Changed all callers.
721
7200a36b
HWN
7222002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
723
1383773b
HWN
724 * gc.h: remove DOUBLECELL card flags.
725
726 * gc-malloc.c (scm_calloc): try to use calloc() before calling
727 scm_realloc().
728
729 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
730 init loop; handle this from scm_init_card_freelist()
731
732 * gc-card.c (scm_init_card_freelist): init bit vector here.
733
7200a36b 734 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 735 num2float.i.c (FLOAT2NUM): idem
7200a36b 736
9981de3a
HWN
7372002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
738
739 * eval.h: prepend libguile/ to include path
740
19647556
MV
7412002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
742
743 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
744