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