fix windows build

This commit is contained in:
Joel Dice 2008-04-11 17:01:17 -06:00
parent 680cb85b5b
commit aa9cb5c086
2 changed files with 9 additions and 15 deletions

View File

@ -129,8 +129,9 @@ compareIpToMethodBounds(Thread* t, intptr_t ip, object method)
if (ip < start) {
return -1;
} else if (ip < start + (singletonCount(t, methodCompiled(t, method))
* BytesPerWord))
} else if (ip < start + static_cast<intptr_t>
(singletonCount(t, methodCompiled(t, method))
* BytesPerWord))
{
return 0;
} else {

View File

@ -564,35 +564,28 @@ class MySystem: public System {
}
}
virtual Status visit(System::Thread* st, System::Thread* sTarget,
virtual Status visit(System::Thread* st UNUSED, System::Thread* sTarget,
ThreadVisitor* visitor)
{
assert(this, st != sTarget);
Thread* t = static_cast<Thread*>(st);
Thread* target = static_cast<Thread*>(sTarget);
ACQUIRE_MONITOR(t, visitLock);
ACQUIRE(this, mutex);
while (target->visitor) traceLock->wait(t);
target->visitor = visitor;
DWORD rv = SuspendThread(target->thread);
int rv = SuspendThread(target->thread);
expect(this, rv != -1);
CONTEXT context;
rv = GetThreadContext(target->thread, &context);
expect(this, rv);
visitor->visit(reinterpret_cast<void*>(context->Eip),
reinterpret_cast<void*>(context->Ebp),
reinterpret_cast<void*>(context->Esp));
visitor->visit(reinterpret_cast<void*>(context.Eip),
reinterpret_cast<void*>(context.Ebp),
reinterpret_cast<void*>(context.Esp));
rv = ResumeThread(target->thread);
expect(this, rv != -1);
target->visitor = 0;
return 0;
}