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