Merge remote-tracking branch 'github/master' into dicej

This commit is contained in:
Joel Dice 2013-02-22 17:13:10 -07:00
commit 0a4a04cc09
3 changed files with 5 additions and 3 deletions

View File

@ -1386,7 +1386,7 @@ endif
$(build)/run-tests.sh: $(test-classes) makefile
echo 'cd $$(dirname $$0)' > $(@)
echo "sh ./test.sh 2>/dev/null \\" >> $(@)
echo "$(shell echo $(library-path) | sed 's|$(build)|\.|g') ./$(name)-unittest${exe-suffix} ./$(name)${exe-suffix} $(mode) \"-Djava.library.path=$$(pwd) -cp test\" \\" >> $(@)
echo "$(shell echo $(library-path) | sed 's|$(build)|\.|g') ./$(name)-unittest${exe-suffix} ./$(name)${exe-suffix} $(mode) \"-Djava.library.path=. -cp test\" \\" >> $(@)
echo "$(call class-names,$(test-build),$(filter-out $(test-support-classes), $(test-classes))) \\" >> $(@)
echo "$(continuation-tests) $(tail-tests)" >> $(@)

View File

@ -2910,7 +2910,8 @@ doCollect(Thread* t, Heap::CollectionType type)
}
if ((root(t, Machine::ObjectsToFinalize) or root(t, Machine::ObjectsToClean))
and m->finalizeThread == 0)
and m->finalizeThread == 0
and t->state != Thread::ExitState)
{
m->finalizeThread = m->processor->makeThread
(m, root(t, Machine::FinalizerThread), m->rootThread);
@ -3473,7 +3474,7 @@ enter(Thread* t, Thread::State s)
switch (t->state) {
case Thread::ExclusiveState: {
assert(t, t->m->exclusive == t);
t->m->exclusive = 0;
// exit state should also be exclusive, so don't set exclusive = 0
t->m->stateLock->notifyAll(t->systemThread);
} break;

View File

@ -1985,6 +1985,7 @@ addThread(Thread* t, Thread* p)
ACQUIRE_RAW(t, t->m->stateLock);
assert(t, p->state == Thread::NoState);
expect(t, t->state == Thread::ActiveState || t->state == Thread::ExclusiveState);
p->state = Thread::IdleState;
++ t->m->threadCount;