Possible Duplicate:
In g++ is C++ 11 thread model using pthreads in the background?
I have read from somewhere that OpenMP is implemented using PThreads in Linux systems although they seem quite different to me. Considering the (relative) similarities between C++11 threads and PThreads I was wondering,
Does anyone know if C++11 threads implemented using PThreads or any other multithreading library in gcc or clang?
There are multiple parts of C++ 2011 multi-threading:
std::thread,std::mutex,std::condition_variable, etc. These abstractions are implemented in terms of pthreads for both libc++ (clang’s native library) and libstdc++ (gcc’s native library). libstdc++ uses an indirection (gthr.h) which can be used to, e.g., stub things out for a single threaded implementation. This is quite obvious from the source of the different synchronization classes.