/* -*- 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/. */
#ifdefined(DEBUG) # define MUTEX_KIND PTHREAD_MUTEX_ERRORCHECK // Linux with glibc, FreeBSD and macOS 10.14+ support adaptive mutexes that // spin for a short number of tries before sleeping. NSPR's locks did this, // too, and it seems like a reasonable thing to do. #elif (defined(__linux__) && defined(__GLIBC__)) || defined(__FreeBSD__) # define MUTEX_KIND PTHREAD_MUTEX_ADAPTIVE_NP #elifdefined(XP_DARWIN) # ifdefined(PTHREAD_MUTEX_POLICY_FIRSTFIT_NP) # define POLICY_KIND PTHREAD_MUTEX_POLICY_FIRSTFIT_NP # else # define POLICY_KIND (3) // The definition is missing in old SDKs # endif #endif
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.