Commit | Line | Data |
---|---|---|
a48d60b1 MD |
1 | 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
2 | ||
3 | * goops.c (scm_primitive_generic_generic): Enable primitive | |
4 | generic if not enabled. | |
5 | (scm_sys_goops_loaded): Setup unextended primitive generics. | |
6 | ||
7 | * goops.c, goops.h (scm_c_extend_primitive_generic): New function. | |
8 | ||
9 | * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New | |
10 | snarf macros. | |
11 | ||
12 | * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a | |
13 | testing example. All uses of SCM_GPROC should be converted.) | |
14 | ||
15 | * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of | |
16 | scm_assoc. | |
17 | ||
18 | * eq.c (scm_equal_p): Turned into a primitive generic. | |
19 | ||
84edc049 RB |
20 | 2003-02-27 Rob Browning <rlb@defaultvalue.org> |
21 | ||
22 | * Makefile.am (scmconfig.h): new target -- generate file from | |
23 | ../config.h. | |
24 | (modinclude_HEADERS): remove version.h. | |
25 | (nodist_modinclude_HEADERS): add version.h. | |
26 | ||
ea5c9285 MD |
27 | 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
28 | ||
b4a1358c MD |
29 | This fixes a serious GC bug, introduced during the latest |
30 | reorganization of the GC, which disabled freeing of structs and | |
31 | GOOPS objects: | |
32 | ||
33 | * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to | |
34 | SCM_EOL. | |
53af8255 MD |
35 | (scm_struct_prehistory): Move scm_free_structs to |
36 | scm_before_mark_c_hook. | |
ea5c9285 | 37 | |
b4a1358c MD |
38 | * gc-card.c (sweep_card): Check that we haven't swept structs on |
39 | this card before. That can happen if scm_i_sweep_all_segments has | |
40 | been called from some other place than scm_igc. | |
41 | ||
c35738c1 MD |
42 | 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
43 | ||
231a4ea8 MD |
44 | * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31 |
45 | (since hash tables now adapt their size). | |
46 | ||
47 | * modules.c (scm_modules_prehistory): Changed from 2001 to 1533 | |
48 | (current number of prehistory bindings; hashtable code will select | |
49 | a prime which is greater than this value). | |
50 | ||
51 | * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139 | |
52 | (current number of initial symbols). | |
53 | ||
54 | * properties.c (scm_init_properties): Don't specify size of | |
55 | scm_properties_whash. | |
56 | ||
57 | * objprop.c (scm_init_objprop): Don't specify size of | |
58 | scm_object_whash. | |
59 | ||
60 | * keywords.c (scm_init_keywords): Don't specify a hash table size. | |
61 | ||
c35738c1 MD |
62 | * hooks.c (scm_c_hook_add): Fixed bug in append mode. |
63 | ||
64 | The following changes introduce the use of resizable hash tables | |
65 | throughout Guile. It also renames the old *-hash-table* functions | |
66 | to *-alist-vector* and places them, together with the rest of the | |
67 | weak vector support, in the module (ice-9 weak-vector). We should | |
68 | probably introduce a new, better, API for weak references, for | |
69 | example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even | |
70 | look like and are used like ordinary pairs.) | |
71 | ||
72 | * environments.c (obarray_enter, obarray_retrieve, obarray_remove, | |
73 | leaf_environment_fold, obarray_remove_all): Use hashtable | |
74 | accessors. | |
75 | ||
76 | * gc.c (scm_init_storage): Moved hook initialization to | |
77 | scm_storage_prehistory. | |
78 | (scm_storage_prehistory): New function. | |
79 | (scm_igc): Added commentary about placement of | |
80 | scm_after_sweep_c_hook. | |
81 | ||
82 | * gc-mark.c (scm_mark_all): Use hashtable accessors. | |
83 | (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and | |
84 | SCM_WVECT_WEAK_VALUE_P. | |
85 | ||
86 | * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New | |
87 | functions. | |
88 | (scm_vector_to_hash_table, scm_c_make_resizing_hash_table): | |
89 | Removed. | |
90 | (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table, | |
91 | scm_make_doubly_weak_hash_table): Moved here from weaks.c. | |
92 | ||
93 | * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added | |
94 | calls to scm_storage_prehistory and scm_hashtab_prehistory. | |
95 | ||
96 | * modules.c (module-reverse-lookup): Use hashtable accessors. | |
97 | ||
98 | * symbols.c, symbols.h (scm_i_hash_symbol): New function. | |
99 | ||
100 | * weaks.c, weaks.h (scm_make_weak_key_alist_vector, | |
101 | scm_make_weak_value_alist_vector, | |
102 | scm_make_doubly_weak_alist_vector): New functions. | |
103 | ||
104 | * weaks.c (scm_init_weaks_builtins): New function. | |
105 | ||
106 | * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE, | |
107 | SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P, | |
108 | SCM_WVECT_NOSCAN_P): New macros. | |
109 | ||
110 | * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P | |
111 | and SCM_WVECT_WEAK_VALUE_P. | |
112 | ||
113 | * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from | |
114 | allocate_weak_vector and exported. | |
115 | ||
0a4c1355 MD |
116 | 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
117 | ||
118 | * hashtab.c: Undid thread safety. (We decided that it's better to | |
119 | let the user explicitly protect the tables (or not) according what | |
120 | is suitable for the application.) | |
121 | ||
87ca11ff MD |
122 | 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
123 | ||
124 | * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made | |
125 | thread safe and handle resizing tables. | |
126 | (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed | |
127 | SCM_DEFER/ALLOW_INTS. | |
128 | ||
f59a096e MD |
129 | 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
130 | ||
131 | * hashtab.c (scm_vector_to_hash_table, | |
132 | scm_c_make_resizing_hash_table, scm_make_hash_table): New | |
133 | functions. | |
134 | (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread | |
135 | safe and handle resizing tables. | |
136 | ||
137 | * weaks.c (scm_make_weak_key_hash_table, | |
138 | scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table): | |
139 | Size argument made optional. Return resizable table if not | |
140 | specified. | |
141 | ||
4b612c5b MD |
142 | 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
143 | ||
144 | * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2): | |
145 | Fixed formals tests for closures. (Thanks to Kevin Ryde.) | |
146 | ||
b3d7f6df MD |
147 | 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
148 | ||
149 | * debug.c (scm_procedure_source): Handle all objects for which | |
150 | procedure? is #t. (Thanks to Bill Schottstaedt.) | |
151 | ||
756414cf MD |
152 | 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
153 | ||
361d631f MD |
154 | * futures.c (mark_futures): Don't need to mark data of recycled |
155 | futures. | |
156 | (scan_futures, cleanup_undead): Be smarter about marking | |
157 | futures---avoid unnecessary passes through future lists. | |
158 | ||
756414cf MD |
159 | * futures.h, futures.c: New files; Introduced recycling of |
160 | futures. For fine-grained threading this lifts performance to | |
161 | another level. We can now use parallelization in inner loops of | |
162 | Guile programs without impossible overhead. | |
163 | ||
164 | * threads.h, threads.c: Moved futures to their own file. | |
165 | ||
166 | * Makefile.am (libguile_la_SOURCES): Added futures.c. | |
167 | (DOT_X_FILES): Added futures.x. | |
168 | (DOT_DOC_FILES): Added futures.doc. | |
169 | (modinclude_HEADERS): Added futures.h. | |
170 | ||
171 | * threads.c, threads.h (scm_i_create_thread): Renamed from | |
172 | create_thread and made global. | |
173 | ||
174 | * futures.c (scm_make_future): New procedure. | |
175 | ||
176 | * eval.c: #include "libguile/futures.h". | |
177 | ||
178 | * init.c: #include "futures.h" | |
179 | (scm_init_guile_1): Call scm_init_futures. | |
180 | ||
181 | * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK. | |
182 | ||
183 | * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here. | |
184 | ||
185 | * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New | |
186 | functions. | |
187 | ||
188 | * eval.c (scm_trampoline_1): Fixed arguments test for closures. | |
189 | ||
b4debead MD |
190 | 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
191 | ||
192 | * threads.c (create_thread): Don't unwind dynwind chain of parent | |
193 | thread before creation. Just start the new thread with an empty | |
194 | dynwind chain. | |
195 | ||
93f26b7b MD |
196 | 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
197 | ||
198 | * evalext.c, evalext.h (scm_self_evaluating_p): New function. | |
199 | ||
38d8927c MD |
200 | 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
201 | ||
41c96c32 MD |
202 | * threads.c (scm_timed_wait_condition_variable): Support timed |
203 | waiting also for simple condition variables. | |
204 | ||
38d8927c MD |
205 | * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead |
206 | of calling the procedure change-object-class. | |
207 | ||
9cf5d9b7 MD |
208 | 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
209 | ||
210 | * ramap.c (scm_ramapc): Typo in error message. | |
211 | ||
bbf8d523 MD |
212 | 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
213 | ||
b46fae00 MD |
214 | * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for |
215 | slots with instance allocation. | |
216 | ||
bbf8d523 MD |
217 | * goops.c, goops.h (scm_class_extended_generic_with_setter): New |
218 | class. | |
219 | (scm_compute_applicable_methods): Use scm_generic_function_methods. | |
220 | ||
221 | * goops.c (scm_generic_function_methods): Support extended | |
222 | generic functions. | |
223 | ||
ebf9b47c MD |
224 | 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
225 | ||
226 | * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future. | |
2e37d6a2 | 227 | Thanks to Neil for pointing this out! |
ebf9b47c | 228 | |
14a9ba3f NJ |
229 | 2002-12-29 Neil Jerram <neil@ossau.uklinux.net> |
230 | ||
231 | * lang.h: Remove declarations matching definitions removed from | |
232 | lang.c (just below). | |
233 | ||
c6a040a8 NJ |
234 | 2002-12-28 Neil Jerram <neil@ossau.uklinux.net> |
235 | ||
6054d805 NJ |
236 | * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, |
237 | scm_m_while, scm_nil_eq): Remove definitions that were superfluous | |
238 | and already commented out. | |
239 | ||
c6a040a8 NJ |
240 | * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token, |
241 | scm_lreadparen): Support reading vectors with Elisp syntax if | |
242 | SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS | |
243 | is not currently defined, and there isn't even a configure switch | |
244 | to enable it yet.) | |
245 | ||
3742c12f MV |
246 | 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de> |
247 | ||
248 | * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath | |
249 | builds work. | |
250 | (EXTRA_DIST): Added version.h.in. | |
251 | ||
fb50ef08 MD |
252 | 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
253 | ||
254 | This change makes it possible for one thread to do lazy sweeping | |
255 | while other threads are running. Now only the mark phase need to | |
256 | have all threads asleep. We should look further into this issue. | |
257 | Presently, I've put the locking of scm_i_sweep_mutex at | |
258 | "conservative" places due to my current lack of knowledge about | |
259 | the garbage collector. Please feel free to restrict these regions | |
260 | further to allow for maximal parallelism! | |
261 | ||
262 | * gc.c, gc.h (scm_i_sweep_mutex): New mutex. | |
263 | ||
264 | * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc, | |
265 | scm_gc_register_collectable_memory): Substitute locking of | |
266 | scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep. | |
267 | (scm_igc): Lock sweep mutex here instead of in callers; Calls to | |
268 | scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate | |
269 | the single-thread section (which now only contains the mark | |
270 | phase). | |
271 | (scm_gc): Don't lock sweeo mutex here since scm_igc locks it; | |
272 | Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly. | |
273 | ||
274 | * threads.c (gc_section_mutex): Removed. | |
275 | ||
9ed24633 MD |
276 | 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
277 | ||
0d48aca5 MD |
278 | * threads.c (create_thread): Clear parent field in root state in |
279 | order not to unnecessarily remember dead threads. | |
280 | ||
9ed24633 MD |
281 | * eval.c (call_subr2o_1, call_lsubr2_2): New functions. |
282 | (scm_trampoline_1, scm_trampoline_2): Use them. | |
283 | ||
29717c89 MD |
284 | 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
285 | ||
286 | Partial introduction of real plugin interface. | |
287 | ||
288 | * Makefile.am (modinclude_HEADERS): Added threads-plugin.h. | |
289 | (EXTRA_DIST): Added threads-plugin.c. | |
290 | ||
291 | * threads-plugin.h, threads-plugin.c: New files. | |
292 | ||
293 | * threads.h: #include "libguile/threads-plugin.h". | |
294 | ||
295 | * threads.c: #include "libguile/threads-plugin.c". | |
296 | ||
297 | * pthread-threads.c: Temporarily remove debugging functions. | |
298 | ||
299 | * threads.c, threads.h (scm_yield): Added back. | |
300 | ||
e29e0b09 MD |
301 | 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
302 | ||
303 | * threads.c (really_launch): Detach before unlocking | |
304 | thread_admin_mutex in order not to risk being joined. | |
305 | (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep | |
306 | thread_admin_mutex locked during GC. | |
307 | ||
308 | * pthread-threads.c, pthread-threads.h: Improvements to debugging | |
309 | functions. | |
310 | ||
0b6843b1 | 311 | 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
93cd4dcd | 312 | |
6da2dfc4 MD |
313 | * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added |
314 | support for debugging mutex operations. | |
315 | ||
1b92fb6b MD |
316 | * threads.c (scm_thread): Removed filed joining_threads. |
317 | (thread_print): Print thread number as well as address of thread | |
318 | structure. | |
0b6843b1 MD |
319 | (scm_join_thread): Bugfix. |
320 | (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex, | |
321 | scm_timed_wait_condition_variable, scm_signal_condition_variable, | |
322 | scm_broadcast_condition_variable): Use the low-level API. | |
323 | (scm_all_threads): Return copy of thread list (to prevent | |
324 | unintended destruction). | |
325 | (scm_threads_prehistory): Initialize heap_mutex of fake thread. | |
1b92fb6b | 326 | |
93cd4dcd MD |
327 | * pthread-threads.c, pthread-threads.h, threads.c: Fixes to |
328 | pthread "native" recursive mutex support. | |
329 | ||
2ff4f181 MD |
330 | 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
331 | ||
28d52ebb MD |
332 | * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions. |
333 | Simply lock a thread C API recursive mutex. | |
334 | (SCM_NONREC_CRITICAL_SECTION_START, | |
335 | SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START, | |
336 | SCM_REC_CRITICAL_SECTION_END): Removed. | |
337 | ||
338 | * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with | |
339 | direct calls to scm_rec_mutex_lock / unlock around the three calls | |
340 | to scm_m_expand_body. | |
341 | ||
342 | * eval.c, eval.h (promise_free): New function. | |
343 | (scm_force): Rewritten; Now thread-safe; Removed | |
344 | SCM_DEFER/ALLOW_INTS. | |
345 | ||
346 | * pthread-threads.h: Added partially implemented plugin interface | |
347 | for recursive mutexes. These are, for now, only intended to be | |
348 | used internally within the Guile implementation. | |
349 | ||
350 | * pthread-threads.c: New file. | |
351 | ||
352 | * threads.c: Conditionally #include "pthread-threads.c". | |
353 | ||
354 | * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be | |
355 | thread-safe; | |
356 | ||
357 | * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX, | |
358 | SCM_GLOBAL_REC_MUTEX): New macros. | |
359 | ||
360 | * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section | |
361 | macros---use mutexes instead. | |
362 | ||
363 | * tags.h (SCM_IM_FUTURE): New tag. | |
364 | ||
365 | * eval.c (scm_m_future): New primitive macro. | |
366 | (SCM_CEVAL): Support futures. | |
367 | (unmemocopy): Support unmemoization of futures. | |
368 | ||
369 | * print.c (scm_isymnames): Name of future isym. | |
370 | ||
2ff4f181 MD |
371 | * version.c: Unmade some changes to my private copy that got |
372 | committed by mistake. | |
373 | ||
392d2833 MD |
374 | 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
375 | ||
e200ddee MD |
376 | * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of |
377 | 2002-12-10. | |
378 | ||
392d2833 MD |
379 | * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists. |
380 | ||
381 | * gc.c (scm_gc_sweep): Call it here instead, which is a more | |
382 | logical place. | |
383 | ||
384 | * threads.c (create_thread): Remember root object until the handle | |
385 | of the new thread is on all_threads list. | |
386 | ||
387 | * root.c (scm_make_root): Moved copying of fluids until after | |
388 | creation of root handle so that the fluids are GC protected. Also | |
389 | removed the critical section. | |
390 | ||
c4c52ebe MD |
391 | 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
392 | ||
960c408c MD |
393 | * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function. |
394 | ||
3cdde9d6 | 395 | * gc-malloc.c (malloc_mutex): New mutex. |
960c408c | 396 | (scm_gc_malloc_prehistory): Initialize it. |
3cdde9d6 MD |
397 | (scm_realloc): Serialize call to realloc |
398 | (scm_calloc): Same for calloc. | |
399 | Thanks to Wolfgang Jaehrling! | |
400 | (Now we have to make sure all calls to malloc/realloc are made | |
401 | through scm_malloc.) | |
402 | ||
960c408c MD |
403 | * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory. |
404 | ||
c4c52ebe MD |
405 | * threads.c (really_launch): Release heap (to prevent deadlock). |
406 | (create_thread): Release heap before locking thread admin mutex. | |
407 | ||
b0dc3d71 MD |
408 | 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
409 | ||
410 | * threads.c (scm_i_thread_invalidate_freelists): New | |
411 | function. | |
412 | ||
413 | * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists. | |
414 | ||
415 | * modules.c (scm_export): Inserted a return statement. | |
416 | ||
06e80f59 HWN |
417 | 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
418 | ||
419 | * modules.c (scm_export): new function | |
420 | ||
421 | * gc-card.c: add a note about malloc()/free() overhead. | |
422 | ||
a12611c3 MD |
423 | 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
424 | ||
425 | * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c | |
426 | in srcdir. | |
427 | ||
c7fabadf MD |
428 | 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
429 | ||
430 | These changes remove scm_ints_disabled (which hasn't has any | |
431 | effect in Guile for quite some time). | |
432 | ||
433 | * async.c, error.h (scm_ints_disabled): Removed. | |
434 | ||
435 | * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1), | |
436 | root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, | |
437 | SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled. | |
438 | (old_ints): Removed. | |
439 | ||
440 | * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive | |
441 | critical section. | |
442 | (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and | |
443 | SCM_ALLOW_INTS. | |
444 | ||
9bc4701c MD |
445 | 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
446 | ||
52340b65 MD |
447 | * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait): |
448 | Removed accidental #if 0 around these functions. | |
449 | ||
9bc4701c MD |
450 | These changes are the start of support for preemptive |
451 | multithreading. Marius and I have agreed that I commit this code | |
452 | into the repository although it isn't thoroughly tested and surely | |
453 | introduces many bugs. The bugs should only be exposed when using | |
454 | threads, though. Signalling and error handling for threads is | |
455 | very likely broken. Work on making the implementation cleaner and | |
456 | more efficient is needed. | |
457 | ||
458 | * __scm.h (SCM_ALLOW_INTS_ONLY): Removed. | |
459 | (SCM_NONREC_CRITICAL_SECTION_START, | |
460 | SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START, | |
461 | SCM_REC_CRITICAL_SECTION_END): New macros. | |
462 | (SCM_CRITICAL_SECTION_START/END): Defined here. | |
463 | ||
464 | * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around | |
465 | the three calls to scm_m_expand_body. | |
466 | ||
467 | * gc.h: #include "libguile/pthread-threads.h"; | |
468 | (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros. | |
469 | ||
470 | * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type | |
471 | scm_t_key; | |
472 | ||
473 | * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist | |
474 | access. | |
475 | ||
476 | * gc-freelist.c (scm_gc_init_freelist): Create freelist keys. | |
477 | ||
478 | * gc-freelist.c, threads.c (really_launch): Use | |
479 | SCM_FREELIST_CREATE. | |
480 | ||
481 | * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory): | |
482 | ||
483 | * gc.c (scm_i_expensive_validation_check, scm_gc, | |
484 | scm_gc_for_newcell): Put threads to sleep before doing GC-related | |
485 | heap administration so that those pieces of code are executed | |
486 | single-threaded. We might consider rewriting these code sections | |
487 | in terms of a "call_gc_code_singly_threaded" construct instead of | |
488 | calling the pair of scm_i_thread_put_to_sleep () and | |
489 | scm_i_thread_wake_up (). Also, we would want to have as many of | |
490 | these sections eleminated. | |
491 | ||
492 | * init.c (scm_init_guile_1): Call scm_threads_prehistory. | |
493 | ||
494 | * inline.h: #include "libguile/threads.h" | |
495 | ||
496 | * pthread-threads.h: Macros now conform more closely to the | |
497 | pthreads interface. Some of them now take a second argument. | |
498 | ||
499 | * threads.c, threads.h: Many changes. | |
500 | ||
501 | 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se> | |
502 | ||
503 | * Makefile.am (version.h): Changed $^ --> $< in rule for | |
504 | version.h. | |
505 | ||
b2cbe8d8 RB |
506 | 2002-12-08 Rob Browning <rlb@defaultvalue.org> |
507 | ||
508 | * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now. | |
509 | (SCM_MINOR_VERSION): use @--@ substitution now. | |
510 | (SCM_MICRO_VERSION): use @--@ substitution now. | |
511 | (scm_effective_version): new function prototype. | |
512 | ||
513 | * version.c (scm_effective_version): new function, also add | |
514 | effective-version. | |
515 | ||
516 | * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION. | |
517 | (libpath.h): use GUILE_EFFECTIVE_VERSION to compute | |
518 | SCM_LIBRARY_DIR. | |
519 | (version.h): generate this here rather than configure.in. This | |
520 | approach tracks source edits better (i.e. more immediately). | |
521 | Might be worth considering for other .in files too. | |
522 | ||
5441c65c MV |
523 | 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de> |
524 | ||
525 | Reorganized thread package selection. A thread package now only | |
526 | implements a small set of pthread like functions and Guile | |
527 | implements the rest on top of that. Guile's implementation is | |
528 | what the "coop-pthreads" package has been previously. Support for | |
529 | "coop" threads has been removed until I get time to add it again. | |
530 | ||
531 | * Makefile.am (libguile_la_SOURCES): Removed iselect.c. | |
532 | (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c, | |
533 | null-threads.c, coop-pthreads.c. | |
534 | (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added | |
535 | pthread-threads.h. | |
536 | ||
537 | * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h. | |
538 | ||
539 | * threads.h: Do not include "libguile/coop-defs.h". Include | |
540 | "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed | |
541 | (previously deprecated) C level thread API prototypes. They are | |
542 | now in the thread package specific headers, "null-threads.h" and | |
543 | "pthread-threads.h". | |
544 | (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR): | |
545 | New. | |
546 | (scm_threads_init): Removed. | |
547 | (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END, | |
548 | SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter, | |
549 | SCM_I_THREAD_SWITCH_COUNT): Define here. | |
550 | (scm_single_thread_p): Removed. | |
551 | (scm_call_with_new_thread): Take two args directly instead of list | |
552 | of two args. | |
553 | (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA, | |
554 | SCM_SET_THREAD_LOCAL_DATA): Define here. | |
555 | ||
556 | * threads.c: Merged with "coop-pthreads.c". | |
557 | ||
558 | * null-threads.h: Implement pthread-like API as a set of macros. | |
559 | ||
560 | * pthread-threads.h: New, implement pthread-like API by deferring | |
561 | to pthread itself. | |
562 | ||
563 | * init.c (scm_init_guile_1): Do not call scm_init_iselect, which | |
564 | has been lost in the reorganization. | |
565 | ||
504d99c5 MD |
566 | 2002-12-01 Mikael Djurfeldt <mdj@linnaeus> |
567 | ||
568 | The following change makes it possible to move procedure | |
569 | application dispatch outside inner loops. The motivation was | |
570 | clean implementation of efficient replacements of R5RS primitives | |
571 | in SRFI-1. | |
572 | ||
573 | The semantics is clear: scm_trampoline_N returns an optimized | |
574 | version of scm_call_N (or NULL if the procedure isn't applicable | |
575 | on N args). | |
576 | ||
577 | Applying the optimization to map and for-each increases efficiency | |
578 | noticeably. For example, (map abs ls) is 8 times faster than | |
579 | before. | |
580 | ||
581 | * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types. | |
582 | ||
583 | * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions. | |
584 | ||
585 | * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions; | |
586 | (map, for-each): Handle also application on two args as a special | |
587 | case; Use trampolines. | |
588 | ||
589 | Other changes: | |
590 | ||
591 | * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o; | |
592 | (subr2oless): Removed. | |
593 | (scm_restricted_vector_sort_x): Use scm_return_first to keep the | |
594 | vector GC protected. | |
595 | ||
596 | * eval.c (check_map_args): Use scm_out_of_range_pos instead of | |
597 | scm_out_of_range. | |
598 | ||
63dd3413 DH |
599 | 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de> |
600 | ||
601 | * evalext.[ch] (scm_m_undefine, undefine): Deprecated. | |
602 | ||
4ba5f279 MD |
603 | 2002-11-17 Mikael Djurfeldt <mdj@linnaeus> |
604 | ||
605 | * debug.c (scm_make_iloc): Added missing "return". | |
606 | ||
56ae231f MV |
607 | 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de> |
608 | ||
609 | * strports.c (scm_eval_string_in_module): Validate second arg to | |
610 | be a module. Thanks to Arno Peters! | |
611 | ||
80b28865 DH |
612 | 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de> |
613 | ||
614 | * .cvsignore: remove goops.c | |
615 | ||
c88b1456 DH |
616 | 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de> |
617 | ||
618 | * modules.c (scm_env_top_level, scm_lookup_closure_module, | |
619 | module_variable, scm_module_lookup_closure, | |
620 | scm_module_transformer, scm_sym2var, scm_module_reverse_lookup, | |
621 | scm_system_module_env_p): Don't compare SCM values with C | |
622 | operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP | |
623 | over SCM_NFALSEP. | |
624 | ||
a8a19efc DH |
625 | 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de> |
626 | ||
627 | * eval.h (SCM_MAKE_ILOC): New macro. | |
628 | ||
629 | * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing | |
630 | the iloc bitpattern here. | |
631 | ||
76734914 MD |
632 | 2002-11-14 Mikael Djurfeldt <mdj@linnaeus> |
633 | ||
634 | * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be | |
635 | part of the API, otherwise it's difficult to write Guile | |
636 | extensions using non-blocking I/O => moved #include | |
637 | "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h. | |
638 | ||
639 | * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex --> | |
640 | s_unlock_mutex. | |
641 | ||
8b5b4a75 MV |
642 | 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de> |
643 | ||
644 | * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They | |
645 | are defined in configure.in. | |
646 | ||
647 | * threads.c: Removed SCM_API from function definitions. SCM_API | |
648 | is only for declarations. | |
649 | ||
e5a83084 MD |
650 | 2002-11-07 Mikael Djurfeldt <mdj@linnaeus> |
651 | ||
9be8bb45 MD |
652 | * coop-pthreads.h: Added support for thread specific data to the |
653 | generic C API for the coop-pthreads case. | |
654 | ||
e5a83084 MD |
655 | * threads.c, threads.h (scm_cond_init): Undo unintentional API |
656 | change. | |
6c214b62 | 657 | (scm_cond_broadcast): Added missing function. |
e5a83084 | 658 | |
7edf178e MV |
659 | 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
660 | ||
661 | * coop.c (coop_next_runnable_thread): Removed, wich should have | |
662 | happened when GUILE_ISELECT was hard-wired. | |
663 | ||
7f5b1b77 MV |
664 | 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de> |
665 | ||
7caa1b07 MV |
666 | * Makefile.am (libguile_la_SOURCES): Added threads.c |
667 | (DOT_DOC_FILES): Added threads.doc. | |
668 | (DOT_X_FILES): Added threads.x. | |
669 | (EXTRA_libguile_la_SOURCES): Removed threads.c. | |
670 | (noinst_HEADERS): Added coop-pthreads.c. | |
671 | (modinclude_HEADERS): Added coop-pthreads.h. | |
672 | ||
673 | * __scm.h (USE_THREADS, GUILE_ISELECT): Define when | |
674 | SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile. | |
675 | ||
bb11cbf4 MV |
676 | * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H. |
677 | Thanks to Bill Schottstaedt! | |
678 | ||
1d4cbbed MV |
679 | * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0. |
680 | ||
7f5b1b77 MV |
681 | * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when |
682 | SCM_COPT_THREADS is defined. | |
683 | (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS | |
684 | is defined. | |
685 | ||
686 | * coop-pthreads.c: Some harmless renamings of internal stuff. | |
687 | (create_thread): New, generalized version of | |
688 | scm_call_with_new_thread. | |
689 | (scm_call_with_new_thread): Use it. | |
690 | (scm_spawn_thread): New, use create_thread. | |
691 | ||
d52f53b1 MV |
692 | 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de> |
693 | ||
694 | * coop-pthreads.c, coop-pthreads.h: Redone completely, you might | |
695 | start testing it now. | |
696 | ||
697 | * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly | |
698 | defined when HAVE_RESTARTABLE_SYSCALLS is not defined. | |
699 | (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS | |
700 | is defined. | |
701 | ||
30f920c3 MV |
702 | 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de> |
703 | ||
704 | * scmsigs.c (signal_cell_handlers, install_handler_data, | |
705 | scm_delq_spine_x, really_install_handler, install_handler): New | |
706 | scheme for triggering signal handlers, to simplify take_signal. | |
707 | (take_signal): Simplified, to avoid race conditions. | |
708 | (scm_sigaction_for_thread): Use new Scheme. Validate that thread | |
709 | hasn't exited yet. | |
710 | ||
711 | * async.c (scm_async_click): Reset pending_asyncs, handle | |
712 | signal_asyncs. Don't set cdr of a non-signal async to #f. | |
713 | (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue | |
714 | always. Set pending_asyncs. | |
715 | (scm_system_async_mark_for_thread): Check that thread has not | |
716 | exited. | |
717 | (scm_unmask_signals, decrease_block): Call scm_async_click after | |
718 | block_asyncs becomes zero. | |
719 | ||
720 | * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of | |
721 | active_asyncs. | |
722 | ||
723 | * root.h (scm_root_state): Added pending_asyncs and signal_asyncs | |
724 | fields. | |
725 | * root.c (root_mark): Mark them. | |
726 | (make_root): Initialize them. | |
727 | ||
728 | * iselect.c, iselect.h: Replaced GUILE_ISELECT with | |
729 | USE_COOP_THREADS. | |
730 | (scm_internal_select): Define one version for USE_COOP_THREADS and | |
731 | one for USE_NULL_THREADS. | |
732 | (scm_init_iselect): Likewise. | |
733 | ||
734 | * inline.h (scm_cell, scm_double_cell): Also allow | |
735 | USE_COPT_THREADS to not protect the slot initializers. | |
736 | ||
737 | * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is | |
738 | because threads need to be initialized before the stack, but | |
739 | gsubrs such as scm_timed_condition_variable_wait can only be | |
740 | created later. | |
741 | ||
742 | * threads.h: Include "coop-pthreads.h" when requested. | |
743 | (scm_threads_make_mutex, scm_threads_lock_mutex, | |
744 | scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were | |
745 | not implemented anyway. | |
746 | (scm_init_thread_procs, scm_try_mutex, | |
747 | scm_timed_condition_variable_wait, | |
748 | scm_broadcast_condition_variable, scm_c_thread_exited_p, | |
749 | scm_thread_exited_p): New prototypes. | |
750 | (struct timespec): Define if not already defined. | |
751 | (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock, | |
752 | scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init, | |
753 | scm_cond_wait, scm_cond_timedwait, scm_cond_signal, | |
754 | scm_cond_broadcast, scm_cond_destroy): Declarations moved here and | |
755 | deprecated. | |
756 | ||
757 | * threads.c: Include <errno.h>. Include "coop-pthreads.c" when | |
758 | requested. | |
759 | (scm_thread_exited_p): New. | |
760 | (scm_try_mutex, scm_broadcast_condition_variable): Newly | |
761 | registered procedures. | |
762 | (scm_wait_condition_variable, scm_timed_wait_condition_variable): | |
763 | Use the latter as the procedure for "wait-condition-variable", | |
764 | thus offering a optional timeout parameter to Scheme. | |
765 | (scm_wait_condition_variable): Implement in terms of | |
766 | scm_timed_wait_condition_variable. | |
767 | (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock, | |
768 | scm_mutex_unlock, scm_mutex_destroy, scm_cond_init, | |
769 | scm_cond_wait, scm_cond_timedwait, scm_cond_signal, | |
770 | scm_cond_broadcast, scm_cond_destroy): Implement in terms of | |
771 | scm_make_mutex, etc, and deprecate. | |
772 | (scm_init_threads): Do not create smobs, leave this to | |
773 | scm_threads_init. Do not include "threads.x" file. | |
774 | (scm_init_thread_procs): New, include "threads.x" here. | |
775 | ||
776 | * null-threads.h (scm_null_mutex, scm_null_mutex_init, | |
777 | scm_null_mutex_lock, scm_null_mutex_unlock, | |
778 | scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init, | |
779 | scm_null_condvar_wait, scm_null_condvar_signal, | |
780 | scm_null_condvar_destroy): Removed. | |
781 | (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init, | |
782 | scm_cond_wait, scm_cond_signal, scm_cond_broadcast, | |
783 | scm_cond_destory): Do not define, they are now deprecated and | |
784 | handled by threads.{h,c}. | |
785 | ||
786 | * null-threads.c (scm_null_mutex, scm_null_cond): Define here. | |
787 | (scm_threads_init): Create smobs here, using the appropriate | |
788 | sizes. | |
789 | (block): Removed, now unused. | |
790 | (scm_c_thread_exited_p): New. | |
791 | (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock, | |
792 | scm_null_mutex_destroy, scm_null_condvar_init, | |
793 | scm_null_condvar_wait, scm_null_condvar_signal, | |
794 | scm_null_condvar_destroy): Removed and updated users to do their | |
795 | task directly. | |
796 | (scm_try_mutex, timeval_subtract, | |
797 | scm_timed_wait_condition_variable, | |
798 | scm_broadcast_condition_variable): New. | |
799 | (scm_wait_condition_variable): Removed. | |
800 | ||
801 | * coop-defs.h (coop_m): Added 'level' field. | |
802 | (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock, | |
803 | scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init, | |
804 | scm_cond_wait, scm_cond_timedwait, scm_cond_signal, | |
805 | scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not | |
806 | define. | |
807 | (coop_condition_variable_broadcast): New. | |
808 | ||
809 | * coop-threads.c (scm_threads_init): Create smobs here, using the | |
810 | appropriate sizes. | |
811 | (scm_c_thread_exited_p, scm_try_mutex, | |
812 | scm_timed_wait_condition_variable, | |
813 | scm_broadcast_condition_variable): New. | |
814 | (scm_wait_condition_variable): Removed. | |
815 | ||
816 | * coop.c (coop_new_mutex_init): Initialize level. | |
817 | (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain | |
818 | level. | |
819 | (coop_condition_variable_signal): Renamed to | |
820 | coop_condition_variable_broadcast and reimplemented in terms of | |
821 | that. Thus... | |
822 | (coop_condition_variable_broadcast): New. | |
823 | ||
824 | * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc. | |
825 | ||
826 | * coop-pthreads.h, coop-pthreads.c: New, but unfinished. | |
827 | ||
087ed40d MV |
828 | 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de> |
829 | ||
65a23095 MV |
830 | * null-threads.c: Include <time.h>. Also, use <...> for inclusion |
831 | of system headers. | |
832 | ||
087ed40d MV |
833 | * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG): |
834 | New. Use it instead of SCM_MAKE_VALIDATE in lots of places to | |
30f920c3 | 835 | give better error messages. Thanks to Bill Schottstaedt! |
087ed40d | 836 | |
5ec1d2c8 DH |
837 | 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de> |
838 | ||
839 | * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed | |
840 | scm_definedp to scm_defined_p and deprecated scm_definedp. | |
841 | ||
100ae50d DH |
842 | 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de> |
843 | ||
844 | * async.h, async.c (scm_system_async): Fixed deprecation to work | |
845 | correctly when deprecated features are excluded. | |
846 | ||
2794cb50 MV |
847 | 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
848 | ||
849 | * async.c (scm_system_async_mark_for_thread): Validate thread | |
850 | argument. | |
851 | ||
852 | * coop-threads.c (scm_i_thread_root): Do not validate argument. | |
853 | ||
854 | * feature.c (scm_init_feature): Don't add 'threads' for | |
855 | USE_NULL_THREADS. | |
856 | ||
857 | * inline.h (scm_cell, scm_double_cell): Also allow | |
858 | USE_NULL_THREADS to not protect the slot initializers. | |
859 | ||
860 | * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not | |
861 | "USE_THREAD". | |
862 | ||
863 | * Makefile.am (noinst_HEADERS): Added null-threads.c. | |
864 | (modinclude_HEADERS): Added null-threads.h. | |
865 | ||
866 | * threads.h: Include null-threads.h when !USE_COOP_THREADS. | |
867 | * threads.c: Include null-threads.c when !USE_COOP_THREADS. | |
868 | (scm_init_threads): Use generic type names scm_t_mutex and | |
869 | scm_t_cond instead of coop_m and coop_c. | |
870 | ||
871 | * null-threads.c, null-threads.h: New files. | |
872 | ||
ff810d7a MV |
873 | 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de> |
874 | ||
875 | * Makefile.am: Replaced "$<" in non-pattern rules with its value. | |
876 | This is to support makes that know about "$<" only in pattern | |
877 | rules, like Sun's make. | |
878 | ||
a90bdb73 MV |
879 | 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de> |
880 | ||
881 | * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute | |
882 | substitution. Thanks to David Allouche! | |
883 | ||
e71a8bf2 DH |
884 | 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de> |
885 | ||
886 | * evalext.h: Replaced SCM_DEBUG_DEPRECATED with | |
887 | !SCM_ENABLE_DEPRECATED. | |
888 | ||
41f77ff5 MV |
889 | 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
890 | ||
504d99c5 | 891 | * async.c (scm_system_async_mark_for_thread): Only call |
41f77ff5 MV |
892 | scm_i_thread_root when USE_THREADS is defined. Use scm_root |
893 | otherwise. | |
894 | ||
895 | * scmsigs.c (take_signal): Only call scm_i_thread_root when | |
896 | USE_THREADS is defined. Use scm_root otherwise. | |
897 | (scm_sigaction_for_thread): Ignore THREAD argument when | |
898 | USE_THREADS is not defined. Also, move THREAD argument defaulting | |
899 | out of HAVE_SIGACTION section, which was a bug. | |
900 | ||
6d16b125 MV |
901 | 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
902 | ||
903 | * scmsigs.c (scm_sigaction_for_thread): Store original handler in | |
904 | signal_handlers, not the closure that is used as the async. | |
905 | The closure is stored in signal_handler_cells, as previously. | |
906 | ||
acfa1f52 MV |
907 | 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de> |
908 | ||
909 | * root.h (scm_root_state): Added 'block_async' slot. | |
910 | (scm_active_asyncs): Removed abbrev. | |
911 | * root.c (scm_make_root): Initialize 'block_asyncs' slot. | |
912 | ||
913 | * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs | |
914 | abbrev. | |
915 | ||
916 | * async.h (scm_call_with_blocked_asyncs, | |
917 | scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs, | |
918 | scm_c_call_with_unblocked_asyncs): New prototypes. | |
919 | (scm_mask_signals, scm_unmask_signals): Deprecated. | |
920 | (scm_mask_ints): Turned into a macro. | |
921 | * async.c (scm_mask_ints): Removed. | |
922 | (scm_run_asyncs): Do not set scm_mask_ints while running an async. | |
923 | this should not be necessary. | |
924 | (scm_async_click): Test block_asyncs instead of scm_mask_ints. | |
925 | (scm_mask_signals, scm_unmask_signals): Deprecated. Emit | |
926 | deprecation warning and check for errornous use. Set block_asyncs | |
927 | instead of scm_mask_ints. | |
928 | (increase_block, decrease_block, scm_call_with_blocked_asyncs, | |
929 | scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs, | |
930 | scm_c_call_with_unblocked_asyncs): New. | |
931 | ||
932 | * script.c (scm_compile_shell_switches): Do not set scm_mask_ints. | |
933 | Asyncs are enabled by default. | |
934 | ||
34010f56 NJ |
935 | 2002-10-09 Neil Jerram <neil@ossau.uklinux.net> |
936 | ||
937 | * vports.c (scm_make_soft_port): Allow vector argument to carry a | |
938 | 6th element: an input waiting thunk. | |
939 | (sf_input_waiting): New. | |
940 | ||
9310d6f2 MV |
941 | 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de> |
942 | ||
943 | * root.c (root_mark): Mark active_asyncs slot. | |
944 | ||
945 | * async.c (scm_async_click): Set the cdr of a executed handler | |
946 | cell to SCM_BOOL_F, not SCM_EOL. | |
947 | (scm_i_queue_async_cell): Queue the cell at the end of the list, | |
948 | and only if the handler procedure is not already present. | |
949 | (scm_system_async_mark_for_thread): Initialize cdr of handler cell | |
950 | with SCM_BOOL_F. | |
951 | * scmsigs.c (scm_sigaction_for_thread): Likewise. | |
952 | ||
ac48c719 RB |
953 | 2002-10-04 Rob Browning <rlb@defaultvalue.org> |
954 | ||
1360a142 RB |
955 | * guile.c (main): switch to scm_lt_dlset_preloaded_symbols; |
956 | ||
957 | * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle, | |
958 | scm_lt_dlopenext, and scm_lt_dlerror. | |
959 | (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose, | |
960 | and scm_lt_dlerror. | |
961 | (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym, | |
962 | and scm_lt_dlerror. | |
963 | (sysdep_dynl_init): switch to scm_lt_dlinit(); | |
964 | ||
965 | * Makefile.am (libguile_la_LIBADD): switch to use | |
966 | libguile-ltdl.la. | |
967 | ||
504d99c5 | 968 | * numbers.c (scm_integer_expt): (expt 0 1) should be 1. |
ac48c719 | 969 | |
497092c9 MV |
970 | 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de> |
971 | ||
972 | * scmsigs.h (scm_sigaction_for_thread): New prototype. | |
973 | * scmsigs.c (got_signal): Removed. | |
974 | (signal_handler_cells, signal_handler_threads): New. | |
975 | (take_signal): Queue the cell of the signal for the specified | |
976 | thread. Reset the signal handler on systems that don't have | |
977 | sigaction. | |
978 | (sys_deliver_signals): Removed. | |
979 | (close_1): New. | |
980 | (scm_sigaction_for_thread): Renamed from scm_sigaction and | |
981 | extended to also set the thread of a signal and allocate a cell | |
982 | for it. Keep the Scheme name "sigaction". Check that signum is | |
983 | within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS. | |
984 | (scm_sigaction): Implement in terms of scm_sigaction_for_thread. | |
985 | (scm_init_scmsigs): Allocate signal_handler_cells and | |
986 | signal_handler_threads vectors. | |
987 | ||
988 | * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so | |
989 | that system asnycs and user asyncs are separated. Reimplemented | |
990 | system asyncs to work per-thread. | |
991 | ||
992 | * gc.c (scm_init_gc): Do not use scm_system_async. | |
993 | ||
994 | * async.h (scm_asyncs_pending, scm_set_tick_rate, | |
995 | scm_set_switch_rate, scm_system_async_mark_from_signal_handler): | |
996 | Removed prototypes. | |
997 | (scm_i_queue_async_cell): New. | |
998 | ||
999 | * __scm.h (scm_asyncs_pending_p): Removed. | |
1000 | (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of | |
1001 | scm_asyncs_pending_p. | |
1002 | ||
1003 | * async.h (scm_system_async_mark_for_thread): New prototype. | |
1004 | ||
1005 | * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code. | |
1006 | ||
1007 | * root.h (scm_root_state): Added new "active_asyncs" slot. | |
1008 | * root.c (scm_make_root): Initialize it to SCM_EOL. | |
1009 | ||
1010 | * coop-defs.h (coop_t): Added new "handle" slot. | |
1011 | * coop-threads.c (all_threads, scm_current_thread, | |
1012 | scm_all_threads, scm_i_thread_root): New. | |
1013 | (scm_threads_init): Add main thread to all_threads. | |
1014 | (scheme_launch_thread): Remove thread from all_threads when it | |
1015 | terminates. | |
1016 | (scm_call_with_new_thread): Initialize handle slot of coop_t | |
1017 | structure and add new thread to all_threads. | |
1018 | (scm_spawn_thread): Likewise. | |
1019 | ||
1020 | * threads.h (scm_current_thread, scm_all_threads): New prototypes. | |
1021 | * threads.c (scm_current_thread, scm_all_threads): Register as | |
1022 | primitives. | |
1023 | ||
1024 | * dynl.c: Use scm_lt_ prefix for libltdl functions. | |
1025 | ||
480fa28d NJ |
1026 | 2002-09-29 Neil Jerram <neil@ossau.uklinux.net> |
1027 | ||
1028 | * script.c (scm_compile_shell_switches): Fix bad spelling of | |
1029 | `explicitly' in comment. | |
1030 | ||
1031 | 2002-09-28 Neil Jerram <neil@ossau.uklinux.net> | |
1032 | ||
1033 | * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid): | |
1034 | Refer to provided? in doc string rather than deprecated feature?. | |
1035 | ||
3553e1d1 GH |
1036 | 2002-09-24 Gary Houston <ghouston@arglist.com> |
1037 | ||
1038 | * inline.h (scm_double_cell): prevent reordering of statements | |
1039 | with any following code (for GCC 3 strict-aliasing). | |
1040 | * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed | |
1041 | the earlier version of the reordering prevention. | |
1042 | ||
4ad0814a HWN |
1043 | 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
1044 | ||
1045 | * inline.h (scm_double_cell): move SET_GCMARK set out of if body. | |
1046 | ||
e88e4f2e HWN |
1047 | 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
1048 | ||
1049 | * gc-malloc.c (scm_gc_register_collectable_memory): more overflow | |
1050 | protection. | |
1051 | ||
1e71eafb HWN |
1052 | 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
1053 | ||
1054 | * inline.h: include stdio.h | |
1055 | ||
1056 | * smob.c (free_print): abort if scm_debug_cell_accesses_p is set | |
1057 | ||
61ef9c1f HWN |
1058 | 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
1059 | ||
dac04e9f HWN |
1060 | * gc-segment.c (scm_i_make_initial_segment): check user settings |
1061 | for sanity. | |
1062 | ||
1063 | * gc-malloc.c (scm_gc_init_malloc): check user settings for | |
1064 | sanity. | |
dac04e9f HWN |
1065 | |
1066 | * gc-freelist.c (scm_init_freelist): check user settings for sanity. | |
1067 | ||
ffd72400 HWN |
1068 | * struct.h: change scm_structs_to_free to scm_i_structs_to_free |
1069 | ||
1070 | * gc-malloc.c (scm_gc_register_collectable_memory): use floats; | |
1e71eafb HWN |
1071 | these won't ever wrap around with high memory usage. Thanks to |
1072 | Sven Hartrumpf for finding this. | |
ffd72400 | 1073 | |
5bd4a949 HWN |
1074 | * gc-freelist.c: include <stdio.h> |
1075 | ||
61ef9c1f HWN |
1076 | * gc-malloc.c: add DEBUGINFO for mtrigger GCs. |
1077 | ||
ffd0ef3b MV |
1078 | 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de> |
1079 | ||
a27e3d14 MV |
1080 | * vectors.h (SCM_VECTOR_REF): New. |
1081 | ||
ffd0ef3b MV |
1082 | * snarf.h (SCM_DEFINE_PUBLIC): New. |
1083 | ||
f8a1712b MV |
1084 | 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de> |
1085 | ||
1086 | * socket.c (scm_addr_vector): Added size of address to arguments. | |
1087 | Use it to avoid accessing a non-existent path in a sockaddr_un. | |
1088 | Changed all callers. | |
1089 | ||
7200a36b HWN |
1090 | 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
1091 | ||
1383773b HWN |
1092 | * gc.h: remove DOUBLECELL card flags. |
1093 | ||
1094 | * gc-malloc.c (scm_calloc): try to use calloc() before calling | |
1095 | scm_realloc(). | |
1096 | ||
1097 | * gc-segment.c (scm_i_initialize_heap_segment_data): remove card | |
1098 | init loop; handle this from scm_init_card_freelist() | |
1099 | ||
1100 | * gc-card.c (scm_init_card_freelist): init bit vector here. | |
1101 | ||
7200a36b | 1102 | * numbers.c (scm_make_real): prevent reordering of statements |
8fa5786d | 1103 | num2float.i.c (FLOAT2NUM): idem |
7200a36b | 1104 | |
9981de3a HWN |
1105 | 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
1106 | ||
1107 | * eval.h: prepend libguile/ to include path | |
1108 | ||
19647556 MV |
1109 | 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de> |
1110 | ||
1111 | * script.c (scm_compile_shell_switches): Added "2002" to Copyright | |
1112 |