// The use of ScopedGCCriticalSection should be preferred whenever possible. class GCCriticalSection { public:
GCCriticalSection(Thread* self, constchar* name)
: self_(self), section_name_(name) {}
~GCCriticalSection() {}
// Starts a GCCriticalSection. Returns the previous no-suspension reason.
EXPORT constchar* Enter(GcCause cause, CollectorType type) ACQUIRE(Roles::uninterruptible_);
// Ends a GCCriticalSection. Takes the old no-suspension reason.
EXPORT voidExit(constchar* old_reason) RELEASE(Roles::uninterruptible_);
// Wait until the GC is finished and then prevent the GC from starting until the destructor. Used // to prevent deadlocks in places where we call ClassLinker::VisitClass with all the threads // suspended. class ScopedGCCriticalSection { public:
EXPORT ScopedGCCriticalSection(Thread* self, GcCause cause, CollectorType collector_type)
ACQUIRE(Roles::uninterruptible_);
EXPORT ~ScopedGCCriticalSection() RELEASE(Roles::uninterruptible_);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.