[cfe-dev] [libc++] Porting libc++ to Windows

Dennis Luehring dl.soluz at gmx.net
Thu Jul 2 03:02:49 PDT 2015


isn't boots threads implementation the best place to look for 
windows/posix related implementations - because there are currently 
c++11 <thread> conform on these platforms?

it would be sad to see libc++ development go through the same 
system-specific-bugs/special behaviour research again

http://www.boost.org/doc/libs/1_58_0/doc/html/thread.html
http://www.boost.org/doc/libs/1_58_0/doc/html/thread/changes.html

Am 02.07.2015 um 11:44 schrieb David Chisnall:
> On 2 Jul 2015, at 10:33, Kim GrÀsman <kim.grasman at gmail.com> wrote:
> >
> > Windows also has a light-weight mutex concept they call critical
> > sections, it's been around since forever. That's what std::mutex
> > should map to, not the Windows Mutex.
>
> Unless I’m missing something (and I may well be - last time I wrote any Win32 code, NT 5 was in beta), CriticalSection objects can not:
>
>   - Specify a timeout after which they’ll stop blocking (maybe you can do this by combining TryEnterCriticalSection and WaitForSingleObject?)
>
>   - Be atomically released when waiting on a condition variable and reacquired
>
> Both of these are required for std::mutex.  SRWLocks support the second, though don’t seem to provide a clean way of implementing the first.
>
> David
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev





More information about the cfe-dev mailing list