Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3



Module Name:    src
Committed By:   kamil
Date:           Wed Dec 21 21:55:46 UTC 2016

Modified Files:
        src/external/gpl3/gcc/dist/libstdc++-v3/include/std: mutex
        src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11: mutex.cc

Log Message:
Add a walkaround for TLS bug in libstdc++ exposed with std::call_once

Currently std::call_once with libstdc++ works only with static linking.
Disable code path using __thread types and introduce FIXME_PR_51139.
Problem discussed in PR 51139

Functional std::call_once is required in LLVM and LLDB codebase.

Example code to test std::call_once:
#include <iostream>
#include <thread>
#include <mutex>
#include <cstdlib>
std::once_flag flag;
int main(int argc, char **argv)
{
        std::call_once(flag, [](){ std::cout << "Simple example: called once\n"; });
        return EXIT_SUCCESS;
}

Sponsored by <The NetBSD Foundation>


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
    src/external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex
cvs rdiff -u -r1.1.1.2 -r1.2 \
    src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index