fix failure to remove thread from wait list in System::Monitor::notifyAll()

This commit is contained in:
Joel Dice 2007-07-29 19:18:18 -06:00
parent 5e336544f5
commit 73155c6196
2 changed files with 4 additions and 8 deletions

View File

@ -16,7 +16,7 @@ src = src
classpath = classpath
test = test
input = $(cls)/Exceptions.class
input = $(cls)/Threads.class
cxx = g++
cc = gcc

View File

@ -288,6 +288,7 @@ class MySystem: public System {
}
t->flags = 0;
t->next = 0;
if (t->r->interrupted()) {
t->r->setInterrupted(false);
@ -330,15 +331,10 @@ class MySystem: public System {
Thread* t = static_cast<Thread*>(context);
if (owner_ == t) {
for (Thread** p = &first; *p;) {
Thread* t = *p;
p = &(t->next);
if (t == last) {
last = 0;
}
for (Thread* t = first; t; t = t->next) {
doNotify(t);
}
first = last = 0;
} else {
sysAbort(s);
}