use ACQUIRE_RAW instead of ACQUIRE in set(), since it will only block for a bounded interval; rename some Heap methods

This commit is contained in:
Joel Dice 2007-06-15 10:00:08 -06:00
parent 1d02290ed1
commit bb2494be83
2 changed files with 5 additions and 5 deletions

View File

@ -22,8 +22,8 @@ class Heap {
virtual ~Heap() { }
virtual void collect(CollectionType type, Iterator* it) = 0;
virtual bool isTenured(void** p) = 0;
virtual void markTenured(void** p);
virtual bool needsMark(void** p) = 0;
virtual void mark(void** p);
};
#endif//HEAP_H

View File

@ -356,9 +356,9 @@ inline void
set(Thread* t, object& target, object value)
{
target = value;
if (t->vm->heap->isTenured(&target)) {
ACQUIRE(t, t->vm->heapLock);
t->vm->heap->markTenured(&target);
if (t->vm->heap->needsMark(&target)) {
ACQUIRE_RAW(t, t->vm->heapLock);
t->vm->heap->mark(&target);
}
}