You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Roger Leigh (JIRA)" <xe...@xml.apache.org> on 2017/06/09 21:42:18 UTC
[jira] [Commented] (XERCESC-2099) Support Standard C++ mutex
[ https://issues.apache.org/jira/browse/XERCESC-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16045071#comment-16045071 ]
Roger Leigh commented on XERCESC-2099:
--------------------------------------
Part of the motivation for this work is investigation into occasional random {{ThreadTest}} failures on FreeBSD which I've been noticing for some time, but haven't yet pinned down a cause.
> Support Standard C++ mutex
> --------------------------
>
> Key: XERCESC-2099
> URL: https://issues.apache.org/jira/browse/XERCESC-2099
> Project: Xerces-C++
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 3.2.0
> Environment: Any supported platform
> Reporter: Roger Leigh
> Labels: c++11, mutex
> Attachments: 0001-StdMutexMgr-Add-C-11-mutex-manager.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Xerces-C currently supports POSIX and Win32 threading models with dedicated mutex manager classes. C++ standards since C\+\+11 support native mutexes which will work on any supported platform.
> The attached patch adds a {{StdMutexMgr}} class and the necessary Autoconf and CMake logic to check if C\+\+ mutexes are available. If not, it will fall back to the existing managers.
> On all but the most current compilers, it will continue to use POSIX/Win32 managers. On the most recent compilers, which default to C\+\+14, the standard mutexes will be used. On older compilers, the user must explicitly enable by setting {{CXXFLAGS=-std=c++11}} or later.
> See
> - [travis|https://travis-ci.org/rleigh-codelibre/xerces-c/builds/241340724]
> - [appveyor|https://ci.appveyor.com/project/rleigh-codelibre/xerces-c/build/1.0.88]
> for build and test results. You'll see that GCC on Linux is using POSIX mutex, while clang on MacOS X is using standard mutex. On Windows, Cygwin uses POSIX mutex while MinGW and MSVC uses standard mutex.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org