don't abort if pthread_kill fails in MySystem::visit

This commit is contained in:
Joel Dice 2009-07-24 19:03:33 -06:00
parent 29858a5299
commit 08e9a99cb5
2 changed files with 8 additions and 5 deletions

View File

@ -6254,7 +6254,7 @@ class MyProcessor: public Processor {
collect(t, Heap::MinorCollection);
}
return visitor.trace;
return visitor.trace ? visitor.trace : makeArray(t, 0);
}
virtual void initialize(BootImage* image, uint8_t* code, unsigned capacity) {

View File

@ -628,13 +628,16 @@ class MySystem: public System {
visitTarget = target;
int rv = pthread_kill(target->thread, VisitSignal);
expect(this, rv == 0);
while (visitTarget) visitLock->wait(t, 0);
if (rv == 0) {
while (visitTarget) visitLock->wait(t, 0);
threadVisitor = 0;
threadVisitor = 0;
return 0;
return 0;
} else {
return -1;
}
}
virtual uint64_t call(void* function, uintptr_t* arguments, uint8_t* types,