Re: [PATCH] D11781: Refactored pthread usage in libcxx

2016-05-10 Thread Fulvio Esposito via cfe-commits
espositofulvio added a comment. In http://reviews.llvm.org/D11781#423520, @rmaprath wrote: > @espositofulvio: Thanks for the patch! :) > > Committed as r268734. Glad to see you land the patch! Great work :) Repository: rL LLVM http://reviews.llvm.org/D11781 _

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2016-05-06 Thread Asiri Rathnayake via cfe-commits
rmaprath added a comment. @espositofulvio: Thanks for the patch! :) Committed as r268734. Repository: rL LLVM http://reviews.llvm.org/D11781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2016-04-20 Thread Asiri Rathnayake via cfe-commits
rmaprath added a comment. In http://reviews.llvm.org/D11781#403349, @rmaprath wrote: > In http://reviews.llvm.org/D11781#403343, @theraven wrote: > > > In http://reviews.llvm.org/D11781#403335, @rmaprath wrote: > > > > > For us (ARM), a threads porting layer is important on several RTOSes > > >

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2016-04-16 Thread Asiri Rathnayake via cfe-commits
rmaprath added a comment. In http://reviews.llvm.org/D11781#403378, @espositofulvio wrote: > In http://reviews.llvm.org/D11781#400968, @rmaprath wrote: > > > Hi, could I know the status of this? I'd like to push this forward. > > > > @espositofulvio: Are you working on this? (just checking since

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2016-04-16 Thread Fulvio Esposito via cfe-commits
espositofulvio added a comment. In http://reviews.llvm.org/D11781#400968, @rmaprath wrote: > Hi, could I know the status of this? I'd like to push this forward. > > @espositofulvio: Are you working on this? (just checking since this has gone > stale for a while). @EricWF: I can create a separate

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2016-04-16 Thread Asiri Rathnayake via cfe-commits
rmaprath added a comment. In http://reviews.llvm.org/D11781#403343, @theraven wrote: > In http://reviews.llvm.org/D11781#403335, @rmaprath wrote: > > > For us (ARM), a threads porting layer is important on several RTOSes (where > > a full-blown pthreads implementations is not available). I will

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2016-04-16 Thread David Chisnall via cfe-commits
theraven added a comment. In http://reviews.llvm.org/D11781#403335, @rmaprath wrote: > For us (ARM), a threads porting layer is important on several RTOSes (where a > full-blown pthreads implementations is not available). I will see if I can > publish one of those porting layer implementations,

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2016-04-16 Thread Asiri Rathnayake via cfe-commits
rmaprath added a comment. Hi Eric, Thanks for the comments! I'll wait a bit for @espositofulvio in case if he wants to push this, otherwise I'll create a new diff with the suggested changes. For us (ARM), a threads porting layer is important on several RTOSes (where a full-blown pthreads imple

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2016-04-15 Thread Eric Fiselier via cfe-commits
EricWF added a comment. I would like to see this patch without the `support/pthread/*.cpp` files. There are a couple of reasons for this. 1. The symbols in those files are private to the dylib, but they are declared in the headers and given external visibility. 2. Those symbols frequently use s

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2016-04-14 Thread Asiri Rathnayake via cfe-commits
rmaprath added a subscriber: rmaprath. rmaprath added a comment. Hi, could I know the status of this? I'd like to push this forward. @espositofulvio: Are you working on this? (just checking since this has gone stale for a while). @EricWF: I can create a separate diff for further review if this

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-09-05 Thread Fulvio Esposito via cfe-commits
espositofulvio updated the summary for this revision. espositofulvio updated this revision to Diff 34104. espositofulvio added a comment. - Addressed possible ABI breaks - Reverted to not using a __config_file as @jroelofs has two separate patch for that Repository: rL LLVM http://reviews.ll

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-19 Thread Eric Fiselier via cfe-commits
EricWF added a comment. In http://reviews.llvm.org/D11781#227606, @espositofulvio wrote: > In http://reviews.llvm.org/D11781#227446, @EricWF wrote: > > > This patch has a long way to go but it has also come a long way. Here are a > > couple of problems I see with it. > > > > 2. This patch adds a

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-19 Thread Fulvio Esposito via cfe-commits
espositofulvio added inline comments. Comment at: include/__mutex_base:36 @@ -35,3 +37,3 @@ #else - mutex() _NOEXCEPT {__m_ = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;} #endif EricWF wrote: > Why was the cast insignificant? The cast was significant, but it

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-19 Thread Fulvio Esposito via cfe-commits
espositofulvio added a comment. In http://reviews.llvm.org/D11781#227446, @EricWF wrote: > This patch has a long way to go but it has also come a long way. Here are a > couple of problems I see with it. > > 2. This patch adds a lot of headers. libc++ has historically tried to keep > the number

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-18 Thread Eric Fiselier via cfe-commits
EricWF added a comment. Added more inline comments. Comment at: include/__mutex_base:36 @@ -35,3 +37,3 @@ #else - mutex() _NOEXCEPT {__m_ = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;} #endif Why was the cast insignificant? Comment at: in

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-18 Thread Eric Fiselier via cfe-commits
EricWF added a reviewer: EricWF. EricWF added a comment. This patch has a long way to go but it has also come a long way. Here are a couple of problems I see with it. 1. There are still plenty of ABI breaks. I'll try and point them all out. 2. This patch adds a lot of headers. libc++ has histori

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-12 Thread Fulvio Esposito via cfe-commits
espositofulvio added a comment. In http://reviews.llvm.org/D11781#222572, @joerg wrote: > This feels a bit like a regression. Before, libc++ works fine by just > pointing into the include directory. With my change it still is fine pointing at the include directory. But as I said, Jonathan fee

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-12 Thread Joerg Sonnenberger via cfe-commits
joerg added a subscriber: joerg. joerg added a comment. This feels a bit like a regression. Before, libc++ works fine by just pointing into the include directory. Repository: rL LLVM http://reviews.llvm.org/D11781 ___ cfe-commits mailing list cf

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-12 Thread Fulvio Esposito via cfe-commits
espositofulvio added a comment. In http://reviews.llvm.org/D11781#222452, @mclow.lists wrote: > How does this change interact with http://reviews.llvm.org/D11963 ? The difference between this and @jroelofs's one is that this copy the __config_site in the source directory which makes everythin

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-11 Thread Marshall Clow via cfe-commits
mclow.lists added a comment. How does this change interact with http://reviews.llvm.org/D11963 ? Repository: rL LLVM http://reviews.llvm.org/D11781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-11 Thread Jonathan Roelofs via cfe-commits
jroelofs added inline comments. Comment at: include/__config:744 @@ +743,3 @@ +#ifndef _LIBCPP_HAS_NO_THREADS +# ifndef _LIBCPP_THREAD_API +# error "No thread API" The reason to use `CMAKE_BINARY_DIR` over `CMAKE_CURRENT_SOURCE_DIR` as the location for this buil

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-11 Thread Fulvio Esposito via cfe-commits
espositofulvio removed rL LLVM as the repository for this revision. espositofulvio updated this revision to Diff 31874. espositofulvio added a comment. Thread library selection is done at configure time by CMake now. http://reviews.llvm.org/D11781 Files: .gitignore CMakeLists.txt include/

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-11 Thread Fulvio Esposito via cfe-commits
espositofulvio added inline comments. Comment at: include/__config:742 @@ +741,3 @@ +#ifndef _LIBCPP_HAS_NO_THREADS +# if defined(__FreeBSD__) || \ +defined(__NetBSD__) || \ jroelofs wrote: > jroelofs wrote: > > espositofulvio wrote: > > > theraven wrote: > >

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-11 Thread Jonathan Roelofs via cfe-commits
jroelofs added inline comments. Comment at: include/__config:742 @@ +741,3 @@ +#ifndef _LIBCPP_HAS_NO_THREADS +# if defined(__FreeBSD__) || \ +defined(__NetBSD__) || \ jroelofs wrote: > espositofulvio wrote: > > theraven wrote: > > > espositofulvio wrote: > >

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-11 Thread Marshall Clow via cfe-commits
mclow.lists added a subscriber: mclow.lists. mclow.lists added a reviewer: mclow.lists. mclow.lists added a comment. I agree with @jroelofs that we don't want to `#include ` in `<__config>` Repository: rL LLVM http://reviews.llvm.org/D11781 ___

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-11 Thread Jonathan Roelofs via cfe-commits
jroelofs added a subscriber: EricWF. Comment at: include/__config:742 @@ +741,3 @@ +#ifndef _LIBCPP_HAS_NO_THREADS +# if defined(__FreeBSD__) || \ +defined(__NetBSD__) || \ espositofulvio wrote: > theraven wrote: > > espositofulvio wrote: > > > jroelofs wrote:

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-11 Thread Fulvio Esposito via cfe-commits
espositofulvio added inline comments. Comment at: include/__config:742 @@ +741,3 @@ +#ifndef _LIBCPP_HAS_NO_THREADS +# if defined(__FreeBSD__) || \ +defined(__NetBSD__) || \ theraven wrote: > espositofulvio wrote: > > jroelofs wrote: > > > espositofulvio wrote

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-11 Thread David Chisnall via cfe-commits
theraven added inline comments. Comment at: include/__config:742 @@ +741,3 @@ +#ifndef _LIBCPP_HAS_NO_THREADS +# if defined(__FreeBSD__) || \ +defined(__NetBSD__) || \ espositofulvio wrote: > jroelofs wrote: > > espositofulvio wrote: > > > jroelofs wrote: > >

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-10 Thread Fulvio Esposito via cfe-commits
espositofulvio added inline comments. Comment at: include/__config:742 @@ +741,3 @@ +#ifndef _LIBCPP_HAS_NO_THREADS +# if defined(__FreeBSD__) || \ +defined(__NetBSD__) || \ jroelofs wrote: > espositofulvio wrote: > > jroelofs wrote: > > > jroelofs wrote: > >

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-10 Thread Jonathan Roelofs via cfe-commits
jroelofs added inline comments. Comment at: include/__config:742 @@ +741,3 @@ +#ifndef _LIBCPP_HAS_NO_THREADS +# if defined(__FreeBSD__) || \ +defined(__NetBSD__) || \ espositofulvio wrote: > jroelofs wrote: > > jroelofs wrote: > > > @espositofulvio: @ed meant

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-10 Thread Fulvio Esposito via cfe-commits
espositofulvio added inline comments. Comment at: include/__config:742 @@ +741,3 @@ +#ifndef _LIBCPP_HAS_NO_THREADS +# if defined(__FreeBSD__) || \ +defined(__NetBSD__) || \ jroelofs wrote: > jroelofs wrote: > > @espositofulvio: @ed meant this: > > > > ``` >

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-10 Thread Jonathan Roelofs via cfe-commits
jroelofs added inline comments. Comment at: include/__config:742 @@ +741,3 @@ +#ifndef _LIBCPP_HAS_NO_THREADS +# if defined(__FreeBSD__) || \ +defined(__NetBSD__) || \ jroelofs wrote: > @espositofulvio: @ed meant this: > > ``` > #ifndef _WIN32 > # include >

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-10 Thread Jonathan Roelofs via cfe-commits
jroelofs added inline comments. Comment at: include/__config:742 @@ +741,3 @@ +#ifndef _LIBCPP_HAS_NO_THREADS +# if defined(__FreeBSD__) || \ +defined(__NetBSD__) || \ @espositofulvio: @ed meant this: ``` #ifndef _WIN32 # include # if _POSIX_THREADS > 0 ..

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-10 Thread Fulvio Esposito via cfe-commits
espositofulvio marked 5 inline comments as done. espositofulvio added a comment. Repository: rL LLVM http://reviews.llvm.org/D11781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-10 Thread Fulvio Esposito via cfe-commits
espositofulvio updated this revision to Diff 31716. espositofulvio added a comment. Added __CloudABI__ to the list of platform using pthread Repository: rL LLVM http://reviews.llvm.org/D11781 Files: include/__config include/__mutex_base include/mutex include/support/condition_variabl

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-10 Thread Fulvio Esposito via cfe-commits
espositofulvio added inline comments. Comment at: include/__config:742 @@ +741,3 @@ +#ifndef _LIBCPP_HAS_NO_THREADS +# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) || defined(__APPLE__) +# define _LIBCPP_THREAD_API _LIBCPP_PTHREAD ed wrot

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-10 Thread David Chisnall via cfe-commits
theraven added a comment. It would be nice to use rwlocks, but that's an ABI-breaking change. We'd need to bump the .so version and other annoyances. Definitely something I'd be in favour of seeing hidden behind some #ifdefs (and enabled for FreeBSD 11 and probably for the libc++ in packages)

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-10 Thread Ed Schouten via cfe-commits
ed added a comment. A general note I have regarding this change: Now that we're introducing separate implementations for mutexes and condition variables, could we also consider letting `shared_mutex` and friends simply use `pthread_rwlock_*()`? We currently have it implemented as a wrapper on t

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-10 Thread Ed Schouten via cfe-commits
ed added a subscriber: ed. Comment at: include/__config:742 @@ +741,3 @@ +#ifndef _LIBCPP_HAS_NO_THREADS +# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) || defined(__APPLE__) +# define _LIBCPP_THREAD_API _LIBCPP_PTHREAD espositofulvio wro

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-10 Thread Jonathan Roelofs via cfe-commits
On 8/8/15 2:23 PM, Fulvio Esposito wrote: espositofulvio added inline comments. Comment at: include/__config:742 @@ +741,3 @@ +#ifndef _LIBCPP_HAS_NO_THREADS +# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) || defined(__APPLE__) +# define _LIBCPP_THREAD_

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-08 Thread Fulvio Esposito via cfe-commits
espositofulvio added inline comments. Comment at: include/__config:742 @@ +741,3 @@ +#ifndef _LIBCPP_HAS_NO_THREADS +# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) || defined(__APPLE__) +# define _LIBCPP_THREAD_API _LIBCPP_PTHREAD therave

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-08 Thread David Chisnall via cfe-commits
theraven added a comment. This version looks much better (well, the previous one is cleaner, but this one looks like it shouldn't break the ABI - did you test this? It looks like it should work, but I've not actually tried it). Comment at: include/__config:742 @@ +741,3 @@ +#

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-07 Thread Fulvio Esposito via cfe-commits
espositofulvio added inline comments. Comment at: include/__mutex_base:246 @@ -266,3 +245,3 @@ -class _LIBCPP_TYPE_VIS condition_variable +class _LIBCPP_TYPE_VIS condition_variable : private __libcxx_support::condition_variable { theraven wrote: > espositofulv

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-07 Thread David Chisnall via cfe-commits
theraven added inline comments. Comment at: include/__mutex_base:246 @@ -266,3 +245,3 @@ -class _LIBCPP_TYPE_VIS condition_variable +class _LIBCPP_TYPE_VIS condition_variable : private __libcxx_support::condition_variable { espositofulvio wrote: > theraven wro

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-06 Thread Fulvio Esposito via cfe-commits
espositofulvio added inline comments. Comment at: include/__mutex_base:246 @@ -266,3 +245,3 @@ -class _LIBCPP_TYPE_VIS condition_variable +class _LIBCPP_TYPE_VIS condition_variable : private __libcxx_support::condition_variable { theraven wrote: > espositofulv

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-06 Thread Fulvio Esposito via cfe-commits
espositofulvio added inline comments. Comment at: include/__mutex_base:19 @@ +18,3 @@ +#ifndef _WIN32 +#include +#endif jroelofs wrote: > I think it might make sense to create a file: `` where the > contents are just: > > ``` > #ifndef _WIN32 > #include > #end

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-06 Thread David Chisnall via cfe-commits
theraven added inline comments. Comment at: include/__mutex_base:246 @@ -266,3 +245,3 @@ -class _LIBCPP_TYPE_VIS condition_variable +class _LIBCPP_TYPE_VIS condition_variable : private __libcxx_support::condition_variable { espositofulvio wrote: > theraven wro

Re: [PATCH] D11781: Refactored pthread usage in libcxx

2015-08-06 Thread David Chisnall via cfe-commits
theraven added inline comments. Comment at: include/__mutex_base:246 @@ -266,3 +245,3 @@ -class _LIBCPP_TYPE_VIS condition_variable +class _LIBCPP_TYPE_VIS condition_variable : private __libcxx_support::condition_variable { Does this change the ABI for a mutex