another attempt to whip Monitor::wait into shape

This commit is contained in:
Joel Dice 2008-01-16 15:17:28 -07:00
parent bb85f5c94d
commit 7a7c36f8e0
2 changed files with 10 additions and 12 deletions

View File

@ -305,16 +305,13 @@ class MySystem: public System {
expect(s, rv == 0 or rv == EINTR);
}
notified = ((t->flags & Notified) == Notified);
notified = ((t->flags & Notified) != 0);
t->flags = 0;
t->next = 0;
if (t->r->interrupted()) {
interrupted = t->r->interrupted();
if (interrupted) {
t->r->setInterrupted(false);
interrupted = true;
} else {
interrupted = false;
}
}
@ -324,6 +321,8 @@ class MySystem: public System {
remove(t);
}
t->next = 0;
owner_ = t;
this->depth = depth;

View File

@ -275,16 +275,13 @@ class MySystem: public System {
r = WaitForSingleObject(t->mutex, INFINITE);
assert(s, r == WAIT_OBJECT_0);
notified = ((t->flags & Notified) == Notified);
notified = ((t->flags & Notified) != 0);
t->flags = 0;
t->next = 0;
if (t->r->interrupted()) {
interrupted = t->r->interrupted();
if (interrupted) {
t->r->setInterrupted(false);
interrupted = true;
} else {
interrupted = false;
}
}
@ -295,6 +292,8 @@ class MySystem: public System {
remove(t);
}
t->next = 0;
owner_ = t;
this->depth = depth;