pthread and standalone c11 thread support #249
Replies: 1 comment
-
Mostly. The C11 standard require that library functions have external linkage, which requires a little more work.
The current status is that mcfgthread can be built with Clang and used as an ordinary library. There is no
You do not have to use the libc++ thread; instead, there is a C++11-ish wrapper header: #include <mcfgthread/cxx11.hpp>
using ::_MCF::thread;
using ::_MCF::mutex;
// ... Some infrastructures of the language itself (and not of the standard library), such as |
Beta Was this translation helpful? Give feedback.
-
If I understand correctly, mcfgthread is a gthread implementation and a c11 thread implementation, but not a pthread implementation.
My use case is to build mpv via llvm mingw toolchain, and it looks like mcfgthread has recently refined llvm support, but libc++ already supports win32 thread, so mcfgthread doesn't seem to make much sense here.
but llvm-mingw still doesn't support c11 thread and is highly dependent on winpthreads to support pthread, so I'd like to be able to support c11 thread via mcfgthread and replace winpthreads to improve language standard compatibility and performance.
In a nutshell, my use case is as follows:
Using libc++ win32 thread implementation to support c++11 thread
Using mcfgthread to support c11 thread
Using mcfgthread instead of winpthreads to support high performance pthread
Is this a meaningful use case please? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions