[kaffe] CVS kaffe (guilhem): Fixed two bugs in jthreads.
Kaffe CVS
cvs-commits at kaffe.org
Thu Jun 3 11:54:08 PDT 2004
PatchSet 4813
Date: 2004/06/03 18:45:58
Author: guilhem
Branch: HEAD
Tag: (none)
Log:
Fixed two bugs in jthreads.
* kaffe/kaffevm/systems/unix-jthreads/jthread.c
(jthread_stop): THREAD_FLAGS_DONTSTOP should 0 to be able to call
die().
(jcondvar_broadcast): Fixed list chaining for condition variables.
Reported by dai shaowei <shwdai at hotmail.com>.
Members:
ChangeLog:1.2381->1.2382
kaffe/kaffevm/systems/unix-jthreads/jthread.c:1.114->1.115
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2381 kaffe/ChangeLog:1.2382
--- kaffe/ChangeLog:1.2381 Thu Jun 3 16:21:24 2004
+++ kaffe/ChangeLog Thu Jun 3 18:45:58 2004
@@ -1,3 +1,13 @@
+2004-06-04 Guilhem Lavaux <guilhem at kaffe.org>,
+ dai shaowei <shwdai at hotmail.com>
+
+ * kaffe/kaffevm/systems/unix-jthreads/jthread.c
+ (jthread_stop): THREAD_FLAGS_DONTSTOP should 0 to be able to call
+ die().
+ (jcondvar_broadcast): Fixed list chaining for condition variables.
+
+ Reported by dai shaowei <shwdai at hotmail.com>.
+
2004-06-03 Dalibor Topic <robilad at kaffe.org>
* m4/acx_pthread.m4:
Index: kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c
diff -u kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c:1.114 kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c:1.115
--- kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c:1.114 Sat May 29 17:01:18 2004
+++ kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c Thu Jun 3 18:45:57 2004
@@ -1831,15 +1831,18 @@
intsDisable();
/* No reason to hit a dead man over the head */
if (jtid->status != THREAD_DEAD) {
- jtid->flags |= THREAD_FLAGS_KILLED;
+ jtid->flags |= THREAD_FLAGS_KILLED;
}
/* if it's us, die */
- if (jtid == jthread_current() &&
- (jtid->flags & THREAD_FLAGS_DONTSTOP) != 0 && blockInts == 1)
- die();
+ if (jtid == jthread_current()
+ && (jtid->flags & THREAD_FLAGS_DONTSTOP) == 0 && blockInts == 1)
+ die();
+
+ /* We only have to resume the thread if it is not us. */
+ if (jtid != jthread_current())
+ resumeThread(jtid);
- resumeThread(jtid);
intsRestore();
}
@@ -2403,8 +2406,8 @@
for (condp = cv; *condp != 0; condp = &(*condp)->next)
;
(*condp) = lock->waiting;
- lock->waiting = *condp;
- *condp = NULL;
+ lock->waiting = *cv;
+ *cv = NULL;
}
intsRestore();
}
More information about the kaffe
mailing list