[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-core THANKS libguile/ChangeLog libg...
From: |
Dirk Herrmann |
Subject: |
guile/guile-core THANKS libguile/ChangeLog libg... |
Date: |
Thu, 30 Nov 2000 02:26:44 -0800 |
CVSROOT: /cvs
Module name: guile
Changes by: Dirk Herrmann <address@hidden> 00/11/30 02:26:44
Modified files:
guile-core : THANKS
guile-core/libguile: ChangeLog coop-threads.c coop.c
Log message:
* coop-threads.c: Don't join finished threads. Thanks to Julian
Satchell.
* coop.c: Removed old non-working code.
CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/THANKS.diff?r1=1.153&r2=1.154
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/ChangeLog.diff?r1=1.1181&r2=1.1182
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/coop-threads.c.diff?r1=1.24&r2=1.25
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/coop.c.diff?r1=1.25&r2=1.26
Patches:
Index: guile/guile-core/THANKS
diff -u guile/guile-core/THANKS:1.153 guile/guile-core/THANKS:1.154
--- guile/guile-core/THANKS:1.153 Sun Nov 12 04:20:52 2000
+++ guile/guile-core/THANKS Thu Nov 30 02:26:43 2000
@@ -1,14 +1,14 @@
The Guile maintainer committee consists of
Jim Blandy
+ Mikael Djurfeldt
Maciej Stachowiak
Marius Vollmer
- Mikael Djurfeldt
Contributors since the last release:
- Greg Harvey
Jost Boekemeier
+ Greg Harvey
For fixes or providing information which led to a fix:
@@ -19,11 +19,12 @@
Brad Knotwell
Matthias Köppe
Bruce Korb
+ Ralf Mattes
Shuji Narazaki
Nicolas Neuss
Han-Wen Nienhuys
David Pirotte
- William Webber
+ Julian Satchell
Dale P. Smith
- Ralf Mattes
Jacques A. Vidrine.
+ William Webber
Index: guile/guile-core/libguile/ChangeLog
diff -u guile/guile-core/libguile/ChangeLog:1.1181
guile/guile-core/libguile/ChangeLog:1.1182
--- guile/guile-core/libguile/ChangeLog:1.1181 Tue Nov 28 10:22:23 2000
+++ guile/guile-core/libguile/ChangeLog Thu Nov 30 02:26:44 2000
@@ -1,3 +1,13 @@
+2000-11-30 Dirk Herrmann <address@hidden>
+
+ Thanks to Julian Satchell for the bug report:
+
+ * coop-threads.c (scm_join_thread): Check whether a thread is
+ finished before trying to join it.
+
+ * coop.c (coop_aborthelp, coop_join): When a thread finishes, its
+ stack base is not set to NULL any more.
+
2000-11-28 Dirk Herrmann <address@hidden>
* strop.c (scm_i_index): Removed outdated comment.
Index: guile/guile-core/libguile/coop-threads.c
diff -u guile/guile-core/libguile/coop-threads.c:1.24
guile/guile-core/libguile/coop-threads.c:1.25
--- guile/guile-core/libguile/coop-threads.c:1.24 Tue Sep 26 11:37:26 2000
+++ guile/guile-core/libguile/coop-threads.c Thu Nov 30 02:26:44 2000
@@ -377,11 +377,24 @@
}
SCM
-scm_join_thread (SCM t)
+scm_join_thread (SCM thread)
#define FUNC_NAME s_join_thread
{
- SCM_VALIDATE_THREAD (1,t);
- coop_join (SCM_THREAD_DATA (t));
+ coop_t *thread_data;
+ SCM_VALIDATE_THREAD (1, thread);
+ /* Dirk:FIXME:: SCM_THREAD_DATA is a handle for a thread. It may be that a
+ * certain thread implementation uses a value of 0 as a valid thread handle.
+ * With the following code, this thread would always be considered finished.
+ */
+ /* Dirk:FIXME:: With preemptive threading, a thread may finish immediately
+ * after SCM_THREAD_DATA is read. Thus, it must be guaranteed that the
+ * handle remains valid until the thread-object is garbage collected, or
+ * a mutex has to be used for reading and modifying SCM_THREAD_DATA.
+ */
+ thread_data = SCM_THREAD_DATA (thread);
+ if (thread_data)
+ /* The thread is still alive */
+ coop_join (thread_data);
return SCM_BOOL_T;
}
#undef FUNC_NAME
Index: guile/guile-core/libguile/coop.c
diff -u guile/guile-core/libguile/coop.c:1.25
guile/guile-core/libguile/coop.c:1.26
--- guile/guile-core/libguile/coop.c:1.25 Fri Apr 21 07:16:30 2000
+++ guile/guile-core/libguile/coop.c Thu Nov 30 02:26:44 2000
@@ -40,7 +40,7 @@
* If you do not wish that, delete this exception notice. */
-/* $Id: coop.c,v 1.25 2000/04/21 14:16:30 mdj Exp $ */
+/* $Id: coop.c,v 1.26 2000/11/30 10:26:44 dirk Exp $ */
/* Cooperative thread library, based on QuickThreads */
@@ -698,11 +698,6 @@
{
coop_t *oldthread = (coop_t *) old;
-#if 0
- /* Marking old->base NULL indicates that this thread is dead */
- oldthread->base = NULL;
-#endif
-
if (oldthread->specific)
free (oldthread->specific);
#ifndef GUILE_PTHREAD_COMPAT
@@ -721,10 +716,6 @@
{
coop_t *old, *newthread;
- /* Check if t is already finished */
- if (t->base == NULL)
- return;
-
/* Create a join list if necessary */
if (t->joining == NULL)
{