lhmouse / mcfgthread

Cornerstone of the MOST efficient std::thread on Windows for mingw-w64
https://gcc-mcf.lhmouse.com/
Other
269 stars 28 forks source link

RealWaitForOnceFlag() in src/env/once_flag.c returns an unexpected value #7

Closed lhmouse closed 8 years ago

lhmouse commented 8 years ago

In RealWaitForOnceFlag() in file src/env/once_flag.c:

    if(bMayTimeOut && _MCFCRT_EXPECT(u64UntilFastMonoClock == 0)){
        return false;
    }

The return false; statement should be return _MCFCRT_kOnceResultTimedOut;.

lhmouse commented 8 years ago

Fixed then. Thank goodness we have not made any use of this path in __gthread_once() or call_once() yet.