1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-09 15:10:29 +02:00

* threads.c (do_thread_exit, scm_cancel_thread,

scm_set_thread_cleanup_x, scm_thread_cleanup): Lock on thread-specific
	admin mutex instead of `thread_admin_mutex'.
	* threads.h (scm_i_thread)[admin_mutex]: New field.
	* throw.c (make_jmpbuf): Don't enter critical section during thread
	spawn -- there is a possibility of deadlock if other threads are
	exiting.
This commit is contained in:
Neil Jerram 2008-02-07 01:24:31 +00:00
parent 0ea659f3ba
commit 86a597f8b3
5 changed files with 37 additions and 26 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2004, 2006 Free Software Foundation, Inc.
/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2004, 2006, 2008 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -75,13 +75,9 @@ static SCM
make_jmpbuf (void)
{
SCM answer;
SCM_CRITICAL_SECTION_START;
{
SCM_NEWSMOB2 (answer, tc16_jmpbuffer, 0, 0);
SETJBJMPBUF(answer, (jmp_buf *)0);
DEACTIVATEJB(answer);
}
SCM_CRITICAL_SECTION_END;
SCM_NEWSMOB2 (answer, tc16_jmpbuffer, 0, 0);
SETJBJMPBUF(answer, (jmp_buf *)0);
DEACTIVATEJB(answer);
return answer;
}