1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +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

@ -3,7 +3,7 @@
#ifndef SCM_THREADS_H
#define SCM_THREADS_H
/* Copyright (C) 1996,1997,1998,2000,2001, 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
/* Copyright (C) 1996,1997,1998,2000,2001, 2002, 2003, 2004, 2006, 2007, 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
@ -52,6 +52,9 @@ typedef struct scm_i_thread {
SCM cleanup_handler;
SCM join_queue;
scm_i_pthread_mutex_t admin_mutex;
SCM result;
int canceled;
int exited;