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