*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
6cdb8c3f
RB
12003-04-05 Rob Browning <rlb@defaultvalue.org>
2
3 * modules.c (s_scm_module_import_interface): move declaration of
4 uses before any code.
5
15635be5
MD
62003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
7
1ecfd013
MD
8 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
9 not top_srcdir.
10
15635be5
MD
11 * hashtab.c (rehash_after_gc): Clear to_rehash list before
12 processing it in order to avoid an infinite loop.
13
14 * print.c (scm_prin1): Remember old state of pstate->writingp.
15
73be1d9e
MV
162003-04-05 Marius Vollmer <mvo@zagadka.de>
17
18 * Changed license terms to the plain LGPL thru-out.
19
ad815c06
RB
202003-04-04 Rob Browning <rlb@defaultvalue.org>
21
22 * socket.c (FLIPCPY_NET_HOST_128): new macro.
23 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
24 rewrite to handle GMP bignums.
25
26
27 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
28
29 * ports.c (scm_getc): minor tweak.
30
31 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
32 rewrite to handle GMP bignums.
33
34 * numbers.c: rewrite *many* functions to handle GMP bignums.
35
36 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
37 handle GMP bignums.
38
39 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
40
41 * init.c (check_config): remove SCM_BIGDIG conditionals.
42 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
43
44 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
45
46 * eval.c: remove SCM_BIGDIG conditionals.
47
48 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
49
6cdb8c3f
RB
502003-03-31 Rob Browning <rlb@defaultvalue.org>
51
52 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
53 to Kevin Ryde.)
54
552003-03-27 Rob Browning <rlb@defaultvalue.org>
56
57 * threads.h: fix various preprocessor usages of new public
58 symbols to expect 0 or 1 values rather than 1 or undefined.
59 i.e. change #ifdef to #if, etc.
60
61 * threads.c: fix various preprocessor usages of new public
62 symbols to expect 0 or 1 values rather than 1 or undefined.
63 i.e. change #ifdef to #if, etc.
64
65 * tags.h: fix various preprocessor usages of new public
66 symbols to expect 0 or 1 values rather than 1 or undefined.
67 i.e. change #ifdef to #if, etc.
68
69 * stacks.c: fix various preprocessor usages of new public
70 symbols to expect 0 or 1 values rather than 1 or undefined.
71 i.e. change #ifdef to #if, etc.
72
73 * stackchk.h: fix various preprocessor usages of new public
74 symbols to expect 0 or 1 values rather than 1 or undefined.
75 i.e. change #ifdef to #if, etc.
76
77 * stackchk.c: fix various preprocessor usages of new public
78 symbols to expect 0 or 1 values rather than 1 or undefined.
79 i.e. change #ifdef to #if, etc.
80
81 * sort.c: fix various preprocessor usages of new public
82 symbols to expect 0 or 1 values rather than 1 or undefined.
83 i.e. change #ifdef to #if, etc.
84
85 * read.c: fix various preprocessor usages of new public
86 symbols to expect 0 or 1 values rather than 1 or undefined.
87 i.e. change #ifdef to #if, etc.
88
89 * random.c: fix various preprocessor usages of new public
90 symbols to expect 0 or 1 values rather than 1 or undefined.
91 i.e. change #ifdef to #if, etc.
92
93 * print.c: fix various preprocessor usages of new public
94 symbols to expect 0 or 1 values rather than 1 or undefined.
95 i.e. change #ifdef to #if, etc.
96
97 * objects.c: fix various preprocessor usages of new public
98 symbols to expect 0 or 1 values rather than 1 or undefined.
99 i.e. change #ifdef to #if, etc.
100
101 * numbers.h: fix various preprocessor usages of new public
102 symbols to expect 0 or 1 values rather than 1 or undefined.
103 i.e. change #ifdef to #if, etc.
104
105 * null-threads.c: fix various preprocessor usages of new public
106 symbols to expect 0 or 1 values rather than 1 or undefined.
107 i.e. change #ifdef to #if, etc.
108
109 * lang.c: fix various preprocessor usages of new public
110 symbols to expect 0 or 1 values rather than 1 or undefined.
111 i.e. change #ifdef to #if, etc.
112
113 * lang.h: fix various preprocessor usages of new public
114 symbols to expect 0 or 1 values rather than 1 or undefined.
115 i.e. change #ifdef to #if, etc.
116
117 * iselect.h: fix various preprocessor usages of new public
118 symbols to expect 0 or 1 values rather than 1 or undefined.
119 i.e. change #ifdef to #if, etc.
120
121 * init.c: fix various preprocessor usages of new public
122 symbols to expect 0 or 1 values rather than 1 or undefined.
123 i.e. change #ifdef to #if, etc.
124
125 * gh_data.c: fix various preprocessor usages of new public
126 symbols to expect 0 or 1 values rather than 1 or undefined.
127 i.e. change #ifdef to #if, etc.
128
129 * gh.h: fix various preprocessor usages of new public
130 symbols to expect 0 or 1 values rather than 1 or undefined.
131 i.e. change #ifdef to #if, etc.
132
133 * gen-scmconfig.c: change most new public symbols to be defined to
134 0 or 1 rather than being either 1 or undefined.
135
136 * gc_os_dep.c: fix various preprocessor usages of new public
137 symbols to expect 0 or 1 values rather than 1 or undefined.
138 i.e. change #ifdef to #if, etc.
139 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
140
141 * gc.h: fix various preprocessor usages of new public
142 symbols to expect 0 or 1 values rather than 1 or undefined.
143 i.e. change #ifdef to #if, etc.
144
145 * gc-card.c: fix various preprocessor usages of new public
146 symbols to expect 0 or 1 values rather than 1 or undefined.
147 i.e. change #ifdef to #if, etc.
148
149 * gc-mark.c: fix various preprocessor usages of new public
150 symbols to expect 0 or 1 values rather than 1 or undefined.
151 i.e. change #ifdef to #if, etc.
152
153 * feature.c: fix various preprocessor usages of new public
154 symbols to expect 0 or 1 values rather than 1 or undefined.
155 i.e. change #ifdef to #if, etc.
156
157 * evalext.c: fix various preprocessor usages of new public
158 symbols to expect 0 or 1 values rather than 1 or undefined.
159 i.e. change #ifdef to #if, etc.
160
161 * eval.h: fix various preprocessor usages of new public
162 symbols to expect 0 or 1 values rather than 1 or undefined.
163 i.e. change #ifdef to #if, etc.
164
165 * eval.c: fix various preprocessor usages of new public
166 symbols to expect 0 or 1 values rather than 1 or undefined.
167 i.e. change #ifdef to #if, etc.
168
169 * eq.c: fix various preprocessor usages of new public
170 symbols to expect 0 or 1 values rather than 1 or undefined.
171 i.e. change #ifdef to #if, etc.
172
173 * coop.c: fix various preprocessor usages of new public
174 symbols to expect 0 or 1 values rather than 1 or undefined.
175 i.e. change #ifdef to #if, etc.
176
177 * coop-threads.c: fix various preprocessor usages of new public
178 symbols to expect 0 or 1 values rather than 1 or undefined.
179 i.e. change #ifdef to #if, etc.
180
181 * coop-pthreads.c: fix various preprocessor usages of new public
182 symbols to expect 0 or 1 values rather than 1 or undefined.
183 i.e. change #ifdef to #if, etc.
184
185 * coop-defs.h: fix various preprocessor usages of new public
186 symbols to expect 0 or 1 values rather than 1 or undefined.
187 i.e. change #ifdef to #if, etc.
188
189 * convert.i.c: fix various preprocessor usages of new public
190 symbols to expect 0 or 1 values rather than 1 or undefined.
191 i.e. change #ifdef to #if, etc.
192
193 * continuations.c: fix various preprocessor usages of new public
194 symbols to expect 0 or 1 values rather than 1 or undefined.
195 i.e. change #ifdef to #if, etc.
196
197 * _scm.h: fix various preprocessor usages of new public symbols to
198 expect 0 or 1 values rather than 1 or undefined. i.e. change
199 #ifdef to #if, etc.
200
d11d697a
MV
2012003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
202
9686f86d
MV
203 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
204
205 * deprecated.c, deprecated.h: New files, to collect deprecated
206 things in one place.
207 * Makefile.am: Added them in all the right places.
208
d11d697a
MV
209 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
210 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
211 builds work.
9686f86d
MV
212 (DOT_X_FILES): Removed "iselect.x".
213 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 214
e3c0c3b9
RB
2152003-03-25 Rob Browning <rlb@defaultvalue.org>
216
217 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
218 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
219
220 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
221
222 * vports.c: #include <config.h> if HAVE_CONFIG_H.
223
224 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
225 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
226
227 * threads.h: replace usage of struct timespect with
228 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
229 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
230 favor of scm_t_timespec from scmconfig.h.
231
232 * threads.c: move libguile/_scm.h include to the top so we pick up
233 any critical defines like _GNU_SOURCE early. Replace usage of
234 struct timespect with scm_t_timespec. Replace usage of
235 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
236 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
237
238 * threads-plugin.h: replace usage of struct timespect with
239 scm_t_timespec.
240
241 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
242 usage of struct timespect with scm_t_timespec.
243
244 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
245 HAVE_INTTYPES_H handling to scmconfig.h. #include
246 "libguile/__scm.h". Rework handling for scm_t_bits,
247 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
248 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
249 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
250 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
251 SCM_HAVE_ARRAYS.
252
253 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
254
255 * struct.c: #include <config.h> if HAVE_CONFIG_H.
256
257 * strports.c: #include <config.h> if HAVE_CONFIG_H.
258
259 * strop.c: #include <config.h> if HAVE_CONFIG_H.
260
261 * stime.h: move handling of time related headers to scmconfig.h.
262
263 * stime.c: #include <config.h> if HAVE_CONFIG_H.
264
265 * stacks.c: replace usage of STACK_GROWS_UP with
266 SCM_STACK_GROWS_UP.
267
268 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
269 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
270
271 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
272 of uint32 and HAVE_UINT_32 with scm_t_int32.
273
274 * smob.c: #include <config.h> if HAVE_CONFIG_H.
275
276 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
277
278 * script.c: #include <config.h> if HAVE_CONFIG_H.
279
280 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
281
282 * scmconfig.h.top: new file -- preamble for scmconfig.h.
283
284 * rw.c: #include <config.h> if HAVE_CONFIG_H.
285
286 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
287
288 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
289
290 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
291
292 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
293 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
294 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
295 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
296
297 * ramap.c: replace usage of HAVE_LONG_LONGS with
298 "SCM_SIZEOF_LONG_LONG != 0".
299
300 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
301 "libguile/scmconfig.h".
302
303 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
304
305 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
306 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
307
308 * posix.c: #include <config.h> if HAVE_CONFIG_H.
309
310 * ports.c: #include <config.h> if HAVE_CONFIG_H.
311
312 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
313
314 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
315 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
316 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
317 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
318 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
319 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
320 "SCM_SIZEOF_LONG_LONG != 0".
321
322 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
323 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
324 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
325 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
326
327 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
328
329 * null-threads.h: replace usage of struct timespect with
330 scm_t_timespec.
331
332 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
333
334 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
335 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
336 scm_t_uint64 and rename usages.
337
338 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
339
340 * load.c: #include <config.h> if HAVE_CONFIG_H.
341
342 * iselect.h: move handling of time related headers to scmconfig.h.
343 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
344 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
345 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
346
347 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
348 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
349 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
350
351 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
352
353 * inline.h: #include "libguile/__scm.h" at the top. Change code
354 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
355 what to do instead of creating a new public #define. Rename usage
356 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
357 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
358 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
359
360 * inline.c: rearrange handling -- now we just #define
361 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
362 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
363 appropriate, and we use that in inline.h along with the above
364 define to determine how to respond.
365
366 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
367 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
368
369 * guile.c: #include <config.h> if HAVE_CONFIG_H.
370
371 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
372 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
373
374 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
375
376 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
377
378 * gen-scmconfig.c: new file -- see comments in file for details.
379
380 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
381
382 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
383 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
384
385 * gc.h: replace usage of SIZEOF_LONG with
386 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
387 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
388 since we handle that in scmconfig.h now.
389
390 * gc.c: #include <config.h> if HAVE_CONFIG_H.
391
392 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
393 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
394 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
395
396 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
397
398 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
399 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
400
401 * fports.c: #include <config.h> if HAVE_CONFIG_H.
402
403 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
404
405 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
406 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
407
408 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
409
410 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
411 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
412
413 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
414 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
415 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
416 with "SCM_SIZEOF_LONG_LONG != 0".
417
418 * error.c: #include <config.h> if HAVE_CONFIG_H.
419
420 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
421 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
422 with "SCM_SIZEOF_LONG_LONG != 0".
423
424 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
425
426 * coop.c: replace usage of struct timespect with scm_t_timespec.
427 #include <config.h> if HAVE_CONFIG_H.
428
429 * coop-threads.c: #include "libguile/_scm.h" early. Replace
430 usage of struct timespect with scm_t_timespec. Replace usage of
431 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
432
433 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
434 usage of struct timespect with scm_t_timespec. Replace usage of
435 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
436
437 * coop-defs.h: move handling of time related headers to
438 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
439 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
440 timespect with scm_t_timespec.
441
442 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
443
444 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
445
446 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
447 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
448
449 * continuations.c: move libguile/_scm.h include to the top so we
450 pick up any critical defines like _GNU_SOURCE early.
451
452 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
453
454 * async.c: #include <config.h> if HAVE_CONFIG_H.
455
456 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
457
458 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
459 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
460
461 * __scm.h: move libguile/scmconfig.h include up to the top, so
462 we're sure to pick up any critical defines like _GNU_SOURCE early.
463 #include <limits.h> removed in favor of scmconfig.h inclusion when
464 appropriate. STDC_HEADERS based inclusion of stdlib.h,
465 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
466 scmconfig.h inclusion when appropriate. Various Win32 related
467 definitions removed in favor of scmconfig.h inclusion when
468 appropriate.
469 (HAVE_UINTPTR_T): definition removed (see NEWS).
470 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
471 (HAVE_LONG_LONGS): definition removed (see NEWS).
472 (HAVE_LONG_LONG): definition removed (see NEWS).
473 (HAVE_PTRDIFF_T): definition removed (see NEWS).
474
475 * Makefile.am: scmconfig.h is now generated by building and
476 running gen-scmconfig.h and capturing its output. gen-scmconfig
477 uses config.h and the configure.in generated gen-scmconfig.h to
478 decide what to output. See gen-scmconfig.c for details.
479 (noinst_PROGRAMS): add gen-scmconfig.
480 (gen_scmconfig_SOURCES): new variable.
481 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
482 cross-compiling right.
483 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
484 (BUILT_SOURCES): add scmconfig.h.
485
25e0bf97
MV
4862003-03-19 Marius Vollmer <mvo@zagadka.de>
487
488 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
489 Adrian Bunk. Thanks!
490
74b6d6e4
MD
4912003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
492
493 * goops.c (make_class_from_template): New fourth arg:
494 applicablep.
495 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
496 cpls.
497
498 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
499
500 * goops.c, objects.c, objects.h (scm_make_extended_class): New
501 second arg: applicablep.
502 (scm_i_inherit_applicable): New function.
503
504 * goops.c, goops.h (scm_class_applicable,
505 scm_class_extended_accessor): New classes.
506
5c9e7dad
DH
5072003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
508
509 * procs.c (scm_procedure_documentation): Removed redundant
510 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
511 predicates.
512
f8af5c6d
MD
5132003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
514
c614a00b
MD
515 * list.c, list.h (scm_filter, scm_filter_x): New functions.
516
109c2c9f
MD
517 * modules.c (scm_module_import_interface): New function.
518
f8af5c6d
MD
519 * goops.c, goops.h (scm_class_accessor_method): Renamed from
520 scm_class_accessor.
521 (scm_class_accessor): New class.
522
a48d60b1
MD
5232003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
524
525 * goops.c (scm_primitive_generic_generic): Enable primitive
526 generic if not enabled.
527 (scm_sys_goops_loaded): Setup unextended primitive generics.
528
529 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
530
531 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
532 snarf macros.
533
534 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
535 testing example. All uses of SCM_GPROC should be converted.)
536
537 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
538 scm_assoc.
539
540 * eq.c (scm_equal_p): Turned into a primitive generic.
541
84edc049
RB
5422003-02-27 Rob Browning <rlb@defaultvalue.org>
543
544 * Makefile.am (scmconfig.h): new target -- generate file from
545 ../config.h.
546 (modinclude_HEADERS): remove version.h.
547 (nodist_modinclude_HEADERS): add version.h.
548
ea5c9285
MD
5492003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
550
b4a1358c
MD
551 This fixes a serious GC bug, introduced during the latest
552 reorganization of the GC, which disabled freeing of structs and
553 GOOPS objects:
554
555 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
556 SCM_EOL.
53af8255
MD
557 (scm_struct_prehistory): Move scm_free_structs to
558 scm_before_mark_c_hook.
ea5c9285 559
b4a1358c
MD
560 * gc-card.c (sweep_card): Check that we haven't swept structs on
561 this card before. That can happen if scm_i_sweep_all_segments has
562 been called from some other place than scm_igc.
563
c35738c1
MD
5642003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
565
231a4ea8
MD
566 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
567 (since hash tables now adapt their size).
568
569 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
570 (current number of prehistory bindings; hashtable code will select
571 a prime which is greater than this value).
572
573 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
574 (current number of initial symbols).
575
576 * properties.c (scm_init_properties): Don't specify size of
577 scm_properties_whash.
578
579 * objprop.c (scm_init_objprop): Don't specify size of
580 scm_object_whash.
581
582 * keywords.c (scm_init_keywords): Don't specify a hash table size.
583
c35738c1
MD
584 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
585
586 The following changes introduce the use of resizable hash tables
587 throughout Guile. It also renames the old *-hash-table* functions
588 to *-alist-vector* and places them, together with the rest of the
589 weak vector support, in the module (ice-9 weak-vector). We should
590 probably introduce a new, better, API for weak references, for
591 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
592 look like and are used like ordinary pairs.)
593
594 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
595 leaf_environment_fold, obarray_remove_all): Use hashtable
596 accessors.
597
598 * gc.c (scm_init_storage): Moved hook initialization to
599 scm_storage_prehistory.
600 (scm_storage_prehistory): New function.
601 (scm_igc): Added commentary about placement of
602 scm_after_sweep_c_hook.
603
604 * gc-mark.c (scm_mark_all): Use hashtable accessors.
605 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
606 SCM_WVECT_WEAK_VALUE_P.
607
608 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
609 functions.
610 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
611 Removed.
612 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
613 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
614
615 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
616 calls to scm_storage_prehistory and scm_hashtab_prehistory.
617
618 * modules.c (module-reverse-lookup): Use hashtable accessors.
619
620 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
621
622 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
623 scm_make_weak_value_alist_vector,
624 scm_make_doubly_weak_alist_vector): New functions.
625
626 * weaks.c (scm_init_weaks_builtins): New function.
627
628 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
629 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
630 SCM_WVECT_NOSCAN_P): New macros.
631
632 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
633 and SCM_WVECT_WEAK_VALUE_P.
634
635 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
636 allocate_weak_vector and exported.
637
0a4c1355
MD
6382003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
639
640 * hashtab.c: Undid thread safety. (We decided that it's better to
641 let the user explicitly protect the tables (or not) according what
642 is suitable for the application.)
643
87ca11ff
MD
6442003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
645
646 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
647 thread safe and handle resizing tables.
648 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
649 SCM_DEFER/ALLOW_INTS.
650
f59a096e
MD
6512003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
652
653 * hashtab.c (scm_vector_to_hash_table,
654 scm_c_make_resizing_hash_table, scm_make_hash_table): New
655 functions.
656 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
657 safe and handle resizing tables.
658
659 * weaks.c (scm_make_weak_key_hash_table,
660 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
661 Size argument made optional. Return resizable table if not
662 specified.
663
4b612c5b
MD
6642003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
665
666 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
667 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
668
b3d7f6df
MD
6692003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
670
671 * debug.c (scm_procedure_source): Handle all objects for which
672 procedure? is #t. (Thanks to Bill Schottstaedt.)
673
756414cf
MD
6742003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
675
361d631f
MD
676 * futures.c (mark_futures): Don't need to mark data of recycled
677 futures.
678 (scan_futures, cleanup_undead): Be smarter about marking
679 futures---avoid unnecessary passes through future lists.
680
756414cf
MD
681 * futures.h, futures.c: New files; Introduced recycling of
682 futures. For fine-grained threading this lifts performance to
683 another level. We can now use parallelization in inner loops of
684 Guile programs without impossible overhead.
685
686 * threads.h, threads.c: Moved futures to their own file.
687
688 * Makefile.am (libguile_la_SOURCES): Added futures.c.
689 (DOT_X_FILES): Added futures.x.
690 (DOT_DOC_FILES): Added futures.doc.
691 (modinclude_HEADERS): Added futures.h.
692
693 * threads.c, threads.h (scm_i_create_thread): Renamed from
694 create_thread and made global.
695
696 * futures.c (scm_make_future): New procedure.
697
698 * eval.c: #include "libguile/futures.h".
699
700 * init.c: #include "futures.h"
701 (scm_init_guile_1): Call scm_init_futures.
702
703 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
704
705 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
706
707 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
708 functions.
709
710 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
711
b4debead
MD
7122003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
713
714 * threads.c (create_thread): Don't unwind dynwind chain of parent
715 thread before creation. Just start the new thread with an empty
716 dynwind chain.
717
93f26b7b
MD
7182003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
719
720 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
721
38d8927c
MD
7222003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
723
41c96c32
MD
724 * threads.c (scm_timed_wait_condition_variable): Support timed
725 waiting also for simple condition variables.
726
38d8927c
MD
727 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
728 of calling the procedure change-object-class.
729
9cf5d9b7
MD
7302003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
731
732 * ramap.c (scm_ramapc): Typo in error message.
733
bbf8d523
MD
7342003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
735
b46fae00
MD
736 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
737 slots with instance allocation.
738
bbf8d523
MD
739 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
740 class.
741 (scm_compute_applicable_methods): Use scm_generic_function_methods.
742
743 * goops.c (scm_generic_function_methods): Support extended
744 generic functions.
745
ebf9b47c
MD
7462002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
747
748 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 749 Thanks to Neil for pointing this out!
ebf9b47c 750
14a9ba3f
NJ
7512002-12-29 Neil Jerram <neil@ossau.uklinux.net>
752
753 * lang.h: Remove declarations matching definitions removed from
754 lang.c (just below).
755
c6a040a8
NJ
7562002-12-28 Neil Jerram <neil@ossau.uklinux.net>
757
6054d805
NJ
758 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
759 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
760 and already commented out.
761
c6a040a8
NJ
762 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
763 scm_lreadparen): Support reading vectors with Elisp syntax if
764 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
765 is not currently defined, and there isn't even a configure switch
766 to enable it yet.)
767
3742c12f
MV
7682002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
769
770 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
771 builds work.
772 (EXTRA_DIST): Added version.h.in.
773
fb50ef08
MD
7742002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
775
776 This change makes it possible for one thread to do lazy sweeping
777 while other threads are running. Now only the mark phase need to
778 have all threads asleep. We should look further into this issue.
779 Presently, I've put the locking of scm_i_sweep_mutex at
780 "conservative" places due to my current lack of knowledge about
781 the garbage collector. Please feel free to restrict these regions
782 further to allow for maximal parallelism!
783
784 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
785
786 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
787 scm_gc_register_collectable_memory): Substitute locking of
788 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
789 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
790 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
791 the single-thread section (which now only contains the mark
792 phase).
793 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
794 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
795
796 * threads.c (gc_section_mutex): Removed.
797
9ed24633
MD
7982002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
799
0d48aca5
MD
800 * threads.c (create_thread): Clear parent field in root state in
801 order not to unnecessarily remember dead threads.
802
9ed24633
MD
803 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
804 (scm_trampoline_1, scm_trampoline_2): Use them.
805
29717c89
MD
8062002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
807
808 Partial introduction of real plugin interface.
809
810 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
811 (EXTRA_DIST): Added threads-plugin.c.
812
813 * threads-plugin.h, threads-plugin.c: New files.
814
815 * threads.h: #include "libguile/threads-plugin.h".
816
817 * threads.c: #include "libguile/threads-plugin.c".
818
819 * pthread-threads.c: Temporarily remove debugging functions.
820
821 * threads.c, threads.h (scm_yield): Added back.
822
e29e0b09
MD
8232002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
824
825 * threads.c (really_launch): Detach before unlocking
826 thread_admin_mutex in order not to risk being joined.
827 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
828 thread_admin_mutex locked during GC.
829
830 * pthread-threads.c, pthread-threads.h: Improvements to debugging
831 functions.
832
0b6843b1 8332002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 834
6da2dfc4
MD
835 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
836 support for debugging mutex operations.
837
1b92fb6b
MD
838 * threads.c (scm_thread): Removed filed joining_threads.
839 (thread_print): Print thread number as well as address of thread
840 structure.
0b6843b1
MD
841 (scm_join_thread): Bugfix.
842 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
843 scm_timed_wait_condition_variable, scm_signal_condition_variable,
844 scm_broadcast_condition_variable): Use the low-level API.
845 (scm_all_threads): Return copy of thread list (to prevent
846 unintended destruction).
847 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 848
93cd4dcd
MD
849 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
850 pthread "native" recursive mutex support.
851
2ff4f181
MD
8522002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
853
28d52ebb
MD
854 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
855 Simply lock a thread C API recursive mutex.
856 (SCM_NONREC_CRITICAL_SECTION_START,
857 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
858 SCM_REC_CRITICAL_SECTION_END): Removed.
859
860 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
861 direct calls to scm_rec_mutex_lock / unlock around the three calls
862 to scm_m_expand_body.
863
864 * eval.c, eval.h (promise_free): New function.
865 (scm_force): Rewritten; Now thread-safe; Removed
866 SCM_DEFER/ALLOW_INTS.
867
868 * pthread-threads.h: Added partially implemented plugin interface
869 for recursive mutexes. These are, for now, only intended to be
870 used internally within the Guile implementation.
871
872 * pthread-threads.c: New file.
873
874 * threads.c: Conditionally #include "pthread-threads.c".
875
876 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
877 thread-safe;
878
879 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
880 SCM_GLOBAL_REC_MUTEX): New macros.
881
882 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
883 macros---use mutexes instead.
884
885 * tags.h (SCM_IM_FUTURE): New tag.
886
887 * eval.c (scm_m_future): New primitive macro.
888 (SCM_CEVAL): Support futures.
889 (unmemocopy): Support unmemoization of futures.
890
891 * print.c (scm_isymnames): Name of future isym.
892
2ff4f181
MD
893 * version.c: Unmade some changes to my private copy that got
894 committed by mistake.
895
392d2833
MD
8962002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
897
e200ddee
MD
898 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
899 2002-12-10.
900
392d2833
MD
901 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
902
903 * gc.c (scm_gc_sweep): Call it here instead, which is a more
904 logical place.
905
906 * threads.c (create_thread): Remember root object until the handle
907 of the new thread is on all_threads list.
908
909 * root.c (scm_make_root): Moved copying of fluids until after
910 creation of root handle so that the fluids are GC protected. Also
911 removed the critical section.
912
c4c52ebe
MD
9132002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
914
960c408c
MD
915 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
916
3cdde9d6 917 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 918 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
919 (scm_realloc): Serialize call to realloc
920 (scm_calloc): Same for calloc.
921 Thanks to Wolfgang Jaehrling!
922 (Now we have to make sure all calls to malloc/realloc are made
923 through scm_malloc.)
924
960c408c
MD
925 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
926
c4c52ebe
MD
927 * threads.c (really_launch): Release heap (to prevent deadlock).
928 (create_thread): Release heap before locking thread admin mutex.
929
b0dc3d71
MD
9302002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
931
932 * threads.c (scm_i_thread_invalidate_freelists): New
933 function.
934
935 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
936
937 * modules.c (scm_export): Inserted a return statement.
938
06e80f59
HWN
9392002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
940
941 * modules.c (scm_export): new function
942
943 * gc-card.c: add a note about malloc()/free() overhead.
944
a12611c3
MD
9452002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
946
947 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
948 in srcdir.
949
c7fabadf
MD
9502002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
951
952 These changes remove scm_ints_disabled (which hasn't has any
953 effect in Guile for quite some time).
954
955 * async.c, error.h (scm_ints_disabled): Removed.
956
957 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
958 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
959 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
960 (old_ints): Removed.
961
962 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
963 critical section.
964 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
965 SCM_ALLOW_INTS.
966
9bc4701c
MD
9672002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
968
52340b65
MD
969 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
970 Removed accidental #if 0 around these functions.
971
9bc4701c
MD
972 These changes are the start of support for preemptive
973 multithreading. Marius and I have agreed that I commit this code
974 into the repository although it isn't thoroughly tested and surely
975 introduces many bugs. The bugs should only be exposed when using
976 threads, though. Signalling and error handling for threads is
977 very likely broken. Work on making the implementation cleaner and
978 more efficient is needed.
979
980 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
981 (SCM_NONREC_CRITICAL_SECTION_START,
982 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
983 SCM_REC_CRITICAL_SECTION_END): New macros.
984 (SCM_CRITICAL_SECTION_START/END): Defined here.
985
986 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
987 the three calls to scm_m_expand_body.
988
989 * gc.h: #include "libguile/pthread-threads.h";
990 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
991
992 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
993 scm_t_key;
994
995 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
996 access.
997
998 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
999
1000 * gc-freelist.c, threads.c (really_launch): Use
1001 SCM_FREELIST_CREATE.
1002
1003 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
1004
1005 * gc.c (scm_i_expensive_validation_check, scm_gc,
1006 scm_gc_for_newcell): Put threads to sleep before doing GC-related
1007 heap administration so that those pieces of code are executed
1008 single-threaded. We might consider rewriting these code sections
1009 in terms of a "call_gc_code_singly_threaded" construct instead of
1010 calling the pair of scm_i_thread_put_to_sleep () and
1011 scm_i_thread_wake_up (). Also, we would want to have as many of
1012 these sections eleminated.
1013
1014 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
1015
1016 * inline.h: #include "libguile/threads.h"
1017
1018 * pthread-threads.h: Macros now conform more closely to the
1019 pthreads interface. Some of them now take a second argument.
1020
1021 * threads.c, threads.h: Many changes.
1022
10232002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1024
1025 * Makefile.am (version.h): Changed $^ --> $< in rule for
1026 version.h.
1027
b2cbe8d8
RB
10282002-12-08 Rob Browning <rlb@defaultvalue.org>
1029
1030 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
1031 (SCM_MINOR_VERSION): use @--@ substitution now.
1032 (SCM_MICRO_VERSION): use @--@ substitution now.
1033 (scm_effective_version): new function prototype.
1034
1035 * version.c (scm_effective_version): new function, also add
1036 effective-version.
1037
1038 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
1039 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
1040 SCM_LIBRARY_DIR.
1041 (version.h): generate this here rather than configure.in. This
1042 approach tracks source edits better (i.e. more immediately).
1043 Might be worth considering for other .in files too.
1044
5441c65c
MV
10452002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
1046
1047 Reorganized thread package selection. A thread package now only
1048 implements a small set of pthread like functions and Guile
1049 implements the rest on top of that. Guile's implementation is
1050 what the "coop-pthreads" package has been previously. Support for
1051 "coop" threads has been removed until I get time to add it again.
1052
1053 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
1054 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
1055 null-threads.c, coop-pthreads.c.
1056 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
1057 pthread-threads.h.
1058
1059 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
1060
1061 * threads.h: Do not include "libguile/coop-defs.h". Include
1062 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
1063 (previously deprecated) C level thread API prototypes. They are
1064 now in the thread package specific headers, "null-threads.h" and
1065 "pthread-threads.h".
1066 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
1067 New.
1068 (scm_threads_init): Removed.
1069 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
1070 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
1071 SCM_I_THREAD_SWITCH_COUNT): Define here.
1072 (scm_single_thread_p): Removed.
1073 (scm_call_with_new_thread): Take two args directly instead of list
1074 of two args.
1075 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
1076 SCM_SET_THREAD_LOCAL_DATA): Define here.
1077
1078 * threads.c: Merged with "coop-pthreads.c".
1079
1080 * null-threads.h: Implement pthread-like API as a set of macros.
1081
1082 * pthread-threads.h: New, implement pthread-like API by deferring
1083 to pthread itself.
1084
1085 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
1086 has been lost in the reorganization.
1087
504d99c5
MD
10882002-12-01 Mikael Djurfeldt <mdj@linnaeus>
1089
1090 The following change makes it possible to move procedure
1091 application dispatch outside inner loops. The motivation was
1092 clean implementation of efficient replacements of R5RS primitives
1093 in SRFI-1.
1094
1095 The semantics is clear: scm_trampoline_N returns an optimized
1096 version of scm_call_N (or NULL if the procedure isn't applicable
1097 on N args).
1098
1099 Applying the optimization to map and for-each increases efficiency
1100 noticeably. For example, (map abs ls) is 8 times faster than
1101 before.
1102
1103 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
1104
1105 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
1106
1107 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
1108 (map, for-each): Handle also application on two args as a special
1109 case; Use trampolines.
1110
1111 Other changes:
1112
1113 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
1114 (subr2oless): Removed.
1115 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
1116 vector GC protected.
1117
1118 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
1119 scm_out_of_range.
1120
63dd3413
DH
11212002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
1122
1123 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
1124
4ba5f279
MD
11252002-11-17 Mikael Djurfeldt <mdj@linnaeus>
1126
1127 * debug.c (scm_make_iloc): Added missing "return".
1128
56ae231f
MV
11292002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
1130
1131 * strports.c (scm_eval_string_in_module): Validate second arg to
1132 be a module. Thanks to Arno Peters!
1133
80b28865
DH
11342002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1135
1136 * .cvsignore: remove goops.c
1137
c88b1456
DH
11382002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1139
1140 * modules.c (scm_env_top_level, scm_lookup_closure_module,
1141 module_variable, scm_module_lookup_closure,
1142 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
1143 scm_system_module_env_p): Don't compare SCM values with C
1144 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
1145 over SCM_NFALSEP.
1146
a8a19efc
DH
11472002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1148
1149 * eval.h (SCM_MAKE_ILOC): New macro.
1150
1151 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
1152 the iloc bitpattern here.
1153
76734914
MD
11542002-11-14 Mikael Djurfeldt <mdj@linnaeus>
1155
1156 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
1157 part of the API, otherwise it's difficult to write Guile
1158 extensions using non-blocking I/O => moved #include
1159 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
1160
1161 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
1162 s_unlock_mutex.
1163
8b5b4a75
MV
11642002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
1165
1166 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
1167 are defined in configure.in.
1168
1169 * threads.c: Removed SCM_API from function definitions. SCM_API
1170 is only for declarations.
1171
e5a83084
MD
11722002-11-07 Mikael Djurfeldt <mdj@linnaeus>
1173
9be8bb45
MD
1174 * coop-pthreads.h: Added support for thread specific data to the
1175 generic C API for the coop-pthreads case.
1176
e5a83084
MD
1177 * threads.c, threads.h (scm_cond_init): Undo unintentional API
1178 change.
6c214b62 1179 (scm_cond_broadcast): Added missing function.
e5a83084 1180
7edf178e
MV
11812002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1182
1183 * coop.c (coop_next_runnable_thread): Removed, wich should have
1184 happened when GUILE_ISELECT was hard-wired.
1185
7f5b1b77
MV
11862002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
1187
7caa1b07
MV
1188 * Makefile.am (libguile_la_SOURCES): Added threads.c
1189 (DOT_DOC_FILES): Added threads.doc.
1190 (DOT_X_FILES): Added threads.x.
1191 (EXTRA_libguile_la_SOURCES): Removed threads.c.
1192 (noinst_HEADERS): Added coop-pthreads.c.
1193 (modinclude_HEADERS): Added coop-pthreads.h.
1194
1195 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
1196 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
1197
bb11cbf4
MV
1198 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
1199 Thanks to Bill Schottstaedt!
1200
1d4cbbed
MV
1201 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
1202
7f5b1b77
MV
1203 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
1204 SCM_COPT_THREADS is defined.
1205 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
1206 is defined.
1207
1208 * coop-pthreads.c: Some harmless renamings of internal stuff.
1209 (create_thread): New, generalized version of
1210 scm_call_with_new_thread.
1211 (scm_call_with_new_thread): Use it.
1212 (scm_spawn_thread): New, use create_thread.
1213
d52f53b1
MV
12142002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
1215
1216 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
1217 start testing it now.
1218
1219 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
1220 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
1221 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
1222 is defined.
1223
30f920c3
MV
12242002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
1225
1226 * scmsigs.c (signal_cell_handlers, install_handler_data,
1227 scm_delq_spine_x, really_install_handler, install_handler): New
1228 scheme for triggering signal handlers, to simplify take_signal.
1229 (take_signal): Simplified, to avoid race conditions.
1230 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
1231 hasn't exited yet.
1232
1233 * async.c (scm_async_click): Reset pending_asyncs, handle
1234 signal_asyncs. Don't set cdr of a non-signal async to #f.
1235 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
1236 always. Set pending_asyncs.
1237 (scm_system_async_mark_for_thread): Check that thread has not
1238 exited.
1239 (scm_unmask_signals, decrease_block): Call scm_async_click after
1240 block_asyncs becomes zero.
1241
1242 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
1243 active_asyncs.
1244
1245 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
1246 fields.
1247 * root.c (root_mark): Mark them.
1248 (make_root): Initialize them.
1249
1250 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
1251 USE_COOP_THREADS.
1252 (scm_internal_select): Define one version for USE_COOP_THREADS and
1253 one for USE_NULL_THREADS.
1254 (scm_init_iselect): Likewise.
1255
1256 * inline.h (scm_cell, scm_double_cell): Also allow
1257 USE_COPT_THREADS to not protect the slot initializers.
1258
1259 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
1260 because threads need to be initialized before the stack, but
1261 gsubrs such as scm_timed_condition_variable_wait can only be
1262 created later.
1263
1264 * threads.h: Include "coop-pthreads.h" when requested.
1265 (scm_threads_make_mutex, scm_threads_lock_mutex,
1266 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
1267 not implemented anyway.
1268 (scm_init_thread_procs, scm_try_mutex,
1269 scm_timed_condition_variable_wait,
1270 scm_broadcast_condition_variable, scm_c_thread_exited_p,
1271 scm_thread_exited_p): New prototypes.
1272 (struct timespec): Define if not already defined.
1273 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
1274 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
1275 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
1276 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
1277 deprecated.
1278
1279 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
1280 requested.
1281 (scm_thread_exited_p): New.
1282 (scm_try_mutex, scm_broadcast_condition_variable): Newly
1283 registered procedures.
1284 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
1285 Use the latter as the procedure for "wait-condition-variable",
1286 thus offering a optional timeout parameter to Scheme.
1287 (scm_wait_condition_variable): Implement in terms of
1288 scm_timed_wait_condition_variable.
1289 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
1290 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
1291 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
1292 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
1293 scm_make_mutex, etc, and deprecate.
1294 (scm_init_threads): Do not create smobs, leave this to
1295 scm_threads_init. Do not include "threads.x" file.
1296 (scm_init_thread_procs): New, include "threads.x" here.
1297
1298 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
1299 scm_null_mutex_lock, scm_null_mutex_unlock,
1300 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
1301 scm_null_condvar_wait, scm_null_condvar_signal,
1302 scm_null_condvar_destroy): Removed.
1303 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
1304 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
1305 scm_cond_destory): Do not define, they are now deprecated and
1306 handled by threads.{h,c}.
1307
1308 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
1309 (scm_threads_init): Create smobs here, using the appropriate
1310 sizes.
1311 (block): Removed, now unused.
1312 (scm_c_thread_exited_p): New.
1313 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
1314 scm_null_mutex_destroy, scm_null_condvar_init,
1315 scm_null_condvar_wait, scm_null_condvar_signal,
1316 scm_null_condvar_destroy): Removed and updated users to do their
1317 task directly.
1318 (scm_try_mutex, timeval_subtract,
1319 scm_timed_wait_condition_variable,
1320 scm_broadcast_condition_variable): New.
1321 (scm_wait_condition_variable): Removed.
1322
1323 * coop-defs.h (coop_m): Added 'level' field.
1324 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
1325 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
1326 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
1327 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
1328 define.
1329 (coop_condition_variable_broadcast): New.
1330
1331 * coop-threads.c (scm_threads_init): Create smobs here, using the
1332 appropriate sizes.
1333 (scm_c_thread_exited_p, scm_try_mutex,
1334 scm_timed_wait_condition_variable,
1335 scm_broadcast_condition_variable): New.
1336 (scm_wait_condition_variable): Removed.
1337
1338 * coop.c (coop_new_mutex_init): Initialize level.
1339 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
1340 level.
1341 (coop_condition_variable_signal): Renamed to
1342 coop_condition_variable_broadcast and reimplemented in terms of
1343 that. Thus...
1344 (coop_condition_variable_broadcast): New.
1345
1346 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
1347
1348 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
1349
087ed40d
MV
13502002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
1351
65a23095
MV
1352 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
1353 of system headers.
1354
087ed40d
MV
1355 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
1356 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 1357 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 1358
5ec1d2c8
DH
13592002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1360
1361 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
1362 scm_definedp to scm_defined_p and deprecated scm_definedp.
1363
100ae50d
DH
13642002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1365
1366 * async.h, async.c (scm_system_async): Fixed deprecation to work
1367 correctly when deprecated features are excluded.
1368
2794cb50
MV
13692002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1370
1371 * async.c (scm_system_async_mark_for_thread): Validate thread
1372 argument.
1373
1374 * coop-threads.c (scm_i_thread_root): Do not validate argument.
1375
1376 * feature.c (scm_init_feature): Don't add 'threads' for
1377 USE_NULL_THREADS.
1378
1379 * inline.h (scm_cell, scm_double_cell): Also allow
1380 USE_NULL_THREADS to not protect the slot initializers.
1381
1382 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
1383 "USE_THREAD".
1384
1385 * Makefile.am (noinst_HEADERS): Added null-threads.c.
1386 (modinclude_HEADERS): Added null-threads.h.
1387
1388 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
1389 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
1390 (scm_init_threads): Use generic type names scm_t_mutex and
1391 scm_t_cond instead of coop_m and coop_c.
1392
1393 * null-threads.c, null-threads.h: New files.
1394
ff810d7a
MV
13952002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
1396
1397 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
1398 This is to support makes that know about "$<" only in pattern
1399 rules, like Sun's make.
1400
a90bdb73
MV
14012002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
1402
1403 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
1404 substitution. Thanks to David Allouche!
1405
e71a8bf2
DH
14062002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
1407
1408 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
1409 !SCM_ENABLE_DEPRECATED.
1410
41f77ff5
MV
14112002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1412
504d99c5 1413 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
1414 scm_i_thread_root when USE_THREADS is defined. Use scm_root
1415 otherwise.
1416
1417 * scmsigs.c (take_signal): Only call scm_i_thread_root when
1418 USE_THREADS is defined. Use scm_root otherwise.
1419 (scm_sigaction_for_thread): Ignore THREAD argument when
1420 USE_THREADS is not defined. Also, move THREAD argument defaulting
1421 out of HAVE_SIGACTION section, which was a bug.
1422
6d16b125
MV
14232002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1424
1425 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
1426 signal_handlers, not the closure that is used as the async.
1427 The closure is stored in signal_handler_cells, as previously.
1428
acfa1f52
MV
14292002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
1430
1431 * root.h (scm_root_state): Added 'block_async' slot.
1432 (scm_active_asyncs): Removed abbrev.
1433 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
1434
1435 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
1436 abbrev.
1437
1438 * async.h (scm_call_with_blocked_asyncs,
1439 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
1440 scm_c_call_with_unblocked_asyncs): New prototypes.
1441 (scm_mask_signals, scm_unmask_signals): Deprecated.
1442 (scm_mask_ints): Turned into a macro.
1443 * async.c (scm_mask_ints): Removed.
1444 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
1445 this should not be necessary.
1446 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
1447 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
1448 deprecation warning and check for errornous use. Set block_asyncs
1449 instead of scm_mask_ints.
1450 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
1451 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
1452 scm_c_call_with_unblocked_asyncs): New.
1453
1454 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
1455 Asyncs are enabled by default.
1456
34010f56
NJ
14572002-10-09 Neil Jerram <neil@ossau.uklinux.net>
1458
1459 * vports.c (scm_make_soft_port): Allow vector argument to carry a
1460 6th element: an input waiting thunk.
1461 (sf_input_waiting): New.
1462
9310d6f2
MV
14632002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
1464
1465 * root.c (root_mark): Mark active_asyncs slot.
1466
1467 * async.c (scm_async_click): Set the cdr of a executed handler
1468 cell to SCM_BOOL_F, not SCM_EOL.
1469 (scm_i_queue_async_cell): Queue the cell at the end of the list,
1470 and only if the handler procedure is not already present.
1471 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
1472 with SCM_BOOL_F.
1473 * scmsigs.c (scm_sigaction_for_thread): Likewise.
1474
ac48c719
RB
14752002-10-04 Rob Browning <rlb@defaultvalue.org>
1476
1360a142
RB
1477 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
1478
1479 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
1480 scm_lt_dlopenext, and scm_lt_dlerror.
1481 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
1482 and scm_lt_dlerror.
1483 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
1484 and scm_lt_dlerror.
1485 (sysdep_dynl_init): switch to scm_lt_dlinit();
1486
1487 * Makefile.am (libguile_la_LIBADD): switch to use
1488 libguile-ltdl.la.
1489
504d99c5 1490 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 1491
497092c9
MV
14922002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
1493
1494 * scmsigs.h (scm_sigaction_for_thread): New prototype.
1495 * scmsigs.c (got_signal): Removed.
1496 (signal_handler_cells, signal_handler_threads): New.
1497 (take_signal): Queue the cell of the signal for the specified
1498 thread. Reset the signal handler on systems that don't have
1499 sigaction.
1500 (sys_deliver_signals): Removed.
1501 (close_1): New.
1502 (scm_sigaction_for_thread): Renamed from scm_sigaction and
1503 extended to also set the thread of a signal and allocate a cell
1504 for it. Keep the Scheme name "sigaction". Check that signum is
1505 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
1506 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
1507 (scm_init_scmsigs): Allocate signal_handler_cells and
1508 signal_handler_threads vectors.
1509
1510 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
1511 that system asnycs and user asyncs are separated. Reimplemented
1512 system asyncs to work per-thread.
1513
1514 * gc.c (scm_init_gc): Do not use scm_system_async.
1515
1516 * async.h (scm_asyncs_pending, scm_set_tick_rate,
1517 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
1518 Removed prototypes.
1519 (scm_i_queue_async_cell): New.
1520
1521 * __scm.h (scm_asyncs_pending_p): Removed.
1522 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
1523 scm_asyncs_pending_p.
1524
1525 * async.h (scm_system_async_mark_for_thread): New prototype.
1526
1527 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
1528
1529 * root.h (scm_root_state): Added new "active_asyncs" slot.
1530 * root.c (scm_make_root): Initialize it to SCM_EOL.
1531
1532 * coop-defs.h (coop_t): Added new "handle" slot.
1533 * coop-threads.c (all_threads, scm_current_thread,
1534 scm_all_threads, scm_i_thread_root): New.
1535 (scm_threads_init): Add main thread to all_threads.
1536 (scheme_launch_thread): Remove thread from all_threads when it
1537 terminates.
1538 (scm_call_with_new_thread): Initialize handle slot of coop_t
1539 structure and add new thread to all_threads.
1540 (scm_spawn_thread): Likewise.
1541
1542 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
1543 * threads.c (scm_current_thread, scm_all_threads): Register as
1544 primitives.
1545
1546 * dynl.c: Use scm_lt_ prefix for libltdl functions.
1547
480fa28d
NJ
15482002-09-29 Neil Jerram <neil@ossau.uklinux.net>
1549
1550 * script.c (scm_compile_shell_switches): Fix bad spelling of
1551 `explicitly' in comment.
1552
15532002-09-28 Neil Jerram <neil@ossau.uklinux.net>
1554
1555 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
1556 Refer to provided? in doc string rather than deprecated feature?.
1557
3553e1d1
GH
15582002-09-24 Gary Houston <ghouston@arglist.com>
1559
1560 * inline.h (scm_double_cell): prevent reordering of statements
1561 with any following code (for GCC 3 strict-aliasing).
1562 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
1563 the earlier version of the reordering prevention.
1564
4ad0814a
HWN
15652002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1566
1567 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
1568
e88e4f2e
HWN
15692002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1570
1571 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
1572 protection.
1573
1e71eafb
HWN
15742002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1575
1576 * inline.h: include stdio.h
1577
1578 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
1579
61ef9c1f
HWN
15802002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1581
dac04e9f
HWN
1582 * gc-segment.c (scm_i_make_initial_segment): check user settings
1583 for sanity.
1584
1585 * gc-malloc.c (scm_gc_init_malloc): check user settings for
1586 sanity.
dac04e9f
HWN
1587
1588 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
1589
ffd72400
HWN
1590 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
1591
1592 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
1593 these won't ever wrap around with high memory usage. Thanks to
1594 Sven Hartrumpf for finding this.
ffd72400 1595
5bd4a949
HWN
1596 * gc-freelist.c: include <stdio.h>
1597
61ef9c1f
HWN
1598 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
1599
ffd0ef3b
MV
16002002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
1601
a27e3d14
MV
1602 * vectors.h (SCM_VECTOR_REF): New.
1603
ffd0ef3b
MV
1604 * snarf.h (SCM_DEFINE_PUBLIC): New.
1605
f8a1712b
MV
16062002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
1607
1608 * socket.c (scm_addr_vector): Added size of address to arguments.
1609 Use it to avoid accessing a non-existent path in a sockaddr_un.
1610 Changed all callers.
1611
7200a36b
HWN
16122002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1613
1383773b
HWN
1614 * gc.h: remove DOUBLECELL card flags.
1615
1616 * gc-malloc.c (scm_calloc): try to use calloc() before calling
1617 scm_realloc().
1618
1619 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
1620 init loop; handle this from scm_init_card_freelist()
1621
1622 * gc-card.c (scm_init_card_freelist): init bit vector here.
1623
7200a36b 1624 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 1625 num2float.i.c (FLOAT2NUM): idem
7200a36b 1626
9981de3a
HWN
16272002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1628
1629 * eval.h: prepend libguile/ to include path
1630
19647556
MV
16312002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
1632
1633 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
1634