diff options
author | Ludovic Courtès <ludo@gnu.org> | 2008-10-31 00:27:20 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2008-10-31 00:27:20 +0100 |
commit | 47b6e9bd8ea4c19404a990688c57f76d27f7768d (patch) | |
tree | 04ea7beb6b17669206daf37a97e87f2c79b36a12 /libguile/srcprop.c | |
parent | 979172b6562f737232f42470a3480e99c2f0f273 (diff) | |
download | guile-47b6e9bd8ea4c19404a990688c57f76d27f7768d.tar.gz |
Don't invoke `on_thread_exit ()' from a pthread key destructor.
The `on_thread_exit ()' function allocates memory via libgc. When
called from the context of a pthread key detructor, the thread is
essentially "dead" already and `GC_lookup_thread ()' returns NULL,
which triggers an assertion in libgc's `thread_local_alloc.c'. This
patch arranges so that `on_thread_exit ()' is called from a suitable
context.
* libguile/threads.c (on_thread_exit): Remove now invalid comment
about access to libgc's TLS.
(init_thread_key): Don't pass `on_thread_exit ()' to
`scm_i_pthread_key_create ()'.
(scm_leave_guile_cleanup): Invoke `do_thread_exit ()'.
(really_launch): Invoke `pthread_exit ()'.
Diffstat (limited to 'libguile/srcprop.c')
0 files changed, 0 insertions, 0 deletions