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