/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
RecursiveMutex::RecursiveMutex(constchar* aName)
: BlockingResourceBase(aName, eRecursiveMutex) #ifdef DEBUG
,
mOwningThread(nullptr),
mEntryCount(0) #endif
{ #ifdef XP_WIN // This number was adapted from NSPR. staticconst DWORD sLockSpinCount = 100;
# ifdefined(RELEASE_OR_BETA) // Vista and later automatically allocate and subsequently leak a debug info // object for each critical section that we allocate unless we tell the // system not to do that.
DWORD flags = CRITICAL_SECTION_NO_DEBUG_INFO; # else
DWORD flags = 0; # endif BOOL r =
InitializeCriticalSectionEx(NativeHandle(mMutex), sLockSpinCount, flags);
MOZ_RELEASE_ASSERT(r); #else
pthread_mutexattr_t attr;
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 ist noch experimentell.