summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Dmitrouk <sdmitrouk@accesssoftek.com>2014-12-08 14:50:21 +0000
committerSergey Dmitrouk <sdmitrouk@accesssoftek.com>2014-12-08 14:50:21 +0000
commit4cc3a2d82ce051b8ed2dcc43ab67026638fcac40 (patch)
treef63420062bb69c9a473c38e3e0bf06ba241a406d
parent64bc246f3feb7eb672ba53860c0c1a98c29f0e48 (diff)
downloadbcm5719-llvm-4cc3a2d82ce051b8ed2dcc43ab67026638fcac40.tar.gz
bcm5719-llvm-4cc3a2d82ce051b8ed2dcc43ab67026638fcac40.zip
Explicitly include <sched.h> for sched_yield()
It might be implicitly included by <pthread.h> (and that's why it worked so far), but it's not guaranteed (for example, this is not the case with newlib). llvm-svn: 223661
-rw-r--r--libcxx/include/mutex1
-rw-r--r--libcxx/include/thread1
2 files changed, 2 insertions, 0 deletions
diff --git a/libcxx/include/mutex b/libcxx/include/mutex
index 9c26356590d..e2a0daa3eab 100644
--- a/libcxx/include/mutex
+++ b/libcxx/include/mutex
@@ -178,6 +178,7 @@ template<class Callable, class ...Args>
#ifndef _LIBCPP_HAS_NO_VARIADICS
#include <tuple>
#endif
+#include <sched.h>
#include <__undef_min_max>
diff --git a/libcxx/include/thread b/libcxx/include/thread
index 808d76b82a0..8a30102f427 100644
--- a/libcxx/include/thread
+++ b/libcxx/include/thread
@@ -99,6 +99,7 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
#include <tuple>
#endif
#include <pthread.h>
+#include <sched.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
OpenPOWER on IntegriCloud