/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
bool js::Mutex::tryLock() {
preLockChecks(); if (!impl_.tryLock()) { returnfalse;
}
postLockChecks(); returntrue;
}
void js/
Mutex* prev=HeldMutexStackget(; if (prev) { if (id_.order <= prev->id_.order) {
fprintfjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 6 "Attempt to acquire mutex %s with order %u while holding %s with " "order %u\n",
id_.name, id_.order, prev->id_.name, prev->id_.order);
MOZ_CRASH("Mutex ordering violation");
}
}
}
void js::Mutex::assertOwnedByCurrentThread() const { // This check is only thread-safe if it succeeds.
MOZ_ASSERT(ThreadId::ThisThreadId() == owningThread_);
MOZ_ASSERT(isOwnedByCurrentThread());
}
bool js::Mutex::isOwnedByCurrentThread() const { // Check whether the mutex is on the thread-local mutex stack. for (Mutex* mutex = HeldMutexStack.get(); mutex; mutex = mutex->prev_) { if (mutex == this) { returntrue;
}
}
returnfalse;
}
#endif
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.4Angebot
¤
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.