[PATCH] D20328: [libcxx] Externally threaded libc++ variant

Ben Craig via cfe-commits cfe-commits at lists.llvm.org
Tue May 24 10:09:40 PDT 2016


bcraig added a comment.

Note: You'll want to look at http://reviews.llvm.org/D20573, as there will be confilicts for whoever submits second.


================
Comment at: include/__threading_support:201
@@ +200,3 @@
+// Mutex
+#define _LIBCPP_MUTEX_INITIALIZER nullptr
+struct __libcpp_platform_mutex_t;
----------------
I'm not sure I like taking the freedom to define _LIBCPP_MUTEX_INITIALIZER away from implementers.

Would it be too terrible to replace this entire #elif block with something like the following?

```
#if !defined(__has_include) || __has_include(<os_provided_thread.h>)
#include <os_provided_thread.h>
#else
#error "_LIBCPP_THREAD_API_EXTERNAL requires the implementer to provide <os_provided_thread.h> in the include path"
#endif
```




http://reviews.llvm.org/D20328





More information about the cfe-commits mailing list