[llvm-dev] LLVM and Pthreads
Zachary Turner via llvm-dev
llvm-dev at lists.llvm.org
Mon May 8 14:52:44 PDT 2017
No, you cannot use pthreads in windows.
If you want to write multithreaded code you need to use (or create) a
portable abstraction
On Sat, May 6, 2017 at 11:22 AM Iulia Stirb via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> On Saturday, May 6, 2017 6:22 PM, Tim Northover <t.p.northover at gmail.com>
> wrote:
>
>
> On 6 May 2017 at 04:16, Iulia Stirb via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > I know clang supports -pthread option (here). Does this mean I can call
> > pthread routines inside llvm code
>
> LLVM itself can run when pthreads isn't available, so while some parts
> do use pthreads they have alternative implementations for other
> systems. Take a look at Mutex.cpp for example: the default is Posix
> but there's a Windows specific version in lib/Support/Windows.
>
>
> > and which pthread library is used, the one for Linux OS or the one for
> Windows?
>
>
> There's never (to my knowledge) a situation where both of those are
> valid answers: if you're running on Linux you'll use a Linux library,
> if you're running on Windows you'll use a Windows library.
>
> Thank you. My question was: is PThreads library for Windows supported by
> LLVM?
>
> Tim.
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170508/fa31ca54/attachment.html>
More information about the llvm-dev
mailing list