History log of /external/libcxx/src/thread.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
29ed46b12e6c5cf0e2f5aadae50137d8eb31bcac 01-Mar-2017 Petr Hosek <phosek@chromium.org> [libcxx] Support threads on Fuchsia

Differential Revision: https://reviews.llvm.org/D30278

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
ff5eeb6beebda3cb406906d8cff40a5fb41eedf2 11-Feb-2017 Ed Schouten <ed@nuxi.nl> Fix the build of thread.cpp on CloudABI.

CloudABI does provide unistd.h, but doesn't define __unix__. We need to
include this header file to make hardware_concurrency work.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
1b939615869e8243a26efe159eece9a703a3c3fe 09-Feb-2017 Asiri Rathnayake <asiri.rathnayake@arm.com> Threading support: externalize sleep_for() function.

Different platforms implement the wait/sleep functions in difrerent ways.
It makes sense to externalize this into the threading API.

Differential revision: https://reviews.llvm.org/D29630

Reviewers: EricWF, joerg

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
cda122b35320c8e49a35f4f5e44c7da7023e4402 06-Feb-2017 Saleem Abdulrasool <compnerd@compnerd.org> Refer to _LIBCPP_MSVC macro where applicable

Replace preprocess conditions of defined(_MSC_VER) &&
!defined(__clang__) with defined(_LIBCPP_MSVC). NFC.

Patch by Dave Lee!

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
24872f4e351dfc336dc6507363734b07f6954bb3 16-Jan-2017 Asiri Rathnayake <asiri.rathnayake@arm.com> [libcxx] Follow-up to r292107

I've missed a couple of updates. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
34777546b99b79c9ff9a4d7ab11672cbe4270fc9 07-Jan-2017 Eric Fiselier <eric@efcs.ca> Ensure Sleep(...) isn't passed the value 0 on Windows

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
cc1d780758e3759212d452e7d71da75bb3b2c076 07-Jan-2017 Saleem Abdulrasool <compnerd@compnerd.org> thread: implement sleep_for on Windows

Windows does not provide an implementation of `nanosleep`. Round up the
time duration to the nearest ms and use `Sleep`. Although this may
over-sleep, there is no hard real-time guarantee on the wake, so
sleeping a bit more is better than under-sleeping as it within the
specification.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
e34f9d5ef356cced5f05d9a06a7e4de9442ddfc7 03-Jan-2017 Saleem Abdulrasool <compnerd@compnerd.org> clean up use of _WIN32

Replace the use of _WIN32 in libc++. Replace most use with a C runtime
check _LIBCPP_MSVCRT or the new _LIBCPP_WIN32 to indicate that we are
using the Win32 API. Use a new _LIBCPP_WCHAR_IS_UCS2 to indicate that we
are on an environment that has a short wchar_t.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@290910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
14c09a2413ed5cc4914d1690f5dbfb9420a45b3c 25-Aug-2016 Marshall Clow <mclow.lists@gmail.com> Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@279744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
0dd618b72363cd1bb4020ce72c4f7b603a5ce96b 03-Jun-2016 Asiri Rathnayake <asiri.rathnayake@arm.com> [libcxx] Fix thread join.pass.cpp segfault after r271475

Some pthread implementations do not like being called pthead_join()
with the pthread_t argument set to 0, and causes a segfault. This
patch fixes this issue by validating the pthread_t argument before
invoking pthread_join().

NFC.

Differential revision: http://reviews.llvm.org/D20929

Change-Id: Ief817c57bd0e1f43cbaa03061e02417d6a180c38
Reviewers: EricWF

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
35ff03b7c2a50d197049edbe223042aec221fec1 06-May-2016 Asiri Rathnayake <asiri.rathnayake@arm.com> Refactor pthread usage of libcxx.

This patch extracts out all the pthread dependencies of libcxx into the
new header __threading_support. The motivation is to make it easy to
re-target libcxx into platforms that do not support pthread.

Original patch from Fulvio Esposito (fulvio.esposito@outlook.com) - D11781

Applied with tweaks - D19412

Change-Id: I301111f0075de93dd8129416e06babc195aa936b

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@268734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
8057a5853073d34cdc32ba0c148e4e964efc7bee 29-Jan-2016 Ben Craig <ben.craig@codeaurora.org> [libcxx] Whitelist inclusion of sysctl.h instead of blacklisting

Instead of excluding all known operating systems that are not derived from BSD,
I now include all operating systems that claim to be derived from BSD.
Hopefully, that will make it so that this check doesn't need to change for
every new operating system that comes along.

http://reviews.llvm.org/D16634


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@259193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
21876f739e97c78816745f2cfb177b3c5a76fff0 10-Mar-2015 Ed Schouten <ed@80386.nl> Don't include <sys/sysctl.h> on CloudABI.

As CloudABI does not provide sysctl(), this header is not present. Make
thread.cpp build correctly (and pass all tests) by not including the header.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
93cfd7fc4e4e3b9b4ca18abdef49b395f8277e42 02-Dec-2014 JF Bastien <jfb@google.com> libc++: support NaCl when building thread.cpp

Summary: NaCl shouldn't include sysctl.h when trying to determine std::thread::hardware_concurrency, it should instead use sysconf(_SC_NPROCESSORS_ONLN) through unistd.h. No test needs to be changed, since hardware_concurrency.pass.cpp already tests that std::thread::hardware_concurrency > 0.

Test Plan: make check-libcxx

Reviewers: dschuff, danalbert

Subscribers: jfb, cfe-commits

Differential Revision: http://reviews.llvm.org/D6470

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@223128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
8d86b2e6867297fb2109824c67c50de67f3a31f2 05-Sep-2014 Jonathan Roelofs <jonathan@codesourcery.com> Allow libc++ to be built on systems without POSIX threads

If you're crazy enough to want this sort of thing, then add
-D_LIBCPP_HAS_NO_THREADS to your CXXFLAGS and
--param=additiona_features=libcpp-has-no-threads to your lit commnad line.

http://reviews.llvm.org/D3969


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
0707b67ac33ee7584be43a2ed2902e61006813b7 04-Jun-2014 David Majnemer <david.majnemer@gmail.com> Handle partial nanosleeps in this_thread::sleep_for

Signals may result in nanosleep returning with only some of the
requested sleeping performed.

Utilize nanosleep's "time-remaining" out parameter to continue sleeping
when this occurs.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@210210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
4c6acb5ecd7fab26583353261fd52a9f7ba2f1e0 04-Jan-2014 Joerg Sonnenberger <joerg@bec.de> Switch to using C++ style casts.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@198505 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
f7555069ab8b7eaf73970a1d325a51bedf2cb250 04-Oct-2013 Howard Hinnant <hhinnant@apple.com> G M: Provides the _LIBCPP_WARNING macro, to be used for MSVC only, since that compiler doesn't support #warning.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
7f76450ee9f14ed646a38f43a09dc49dde413281 14-Aug-2013 Howard Hinnant <hhinnant@apple.com> Xing Xue: port to IBM XLC++/AIX.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
725ae713f2fc5fa41ab8004f4f707117d6f70d51 02-Jul-2013 Howard Hinnant <hhinnant@apple.com> Windows support in thread::hardware_concurrency.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
312926eed409beb23ef96bbca9642e27961ce27a 30-Jun-2013 Howard Hinnant <hhinnant@apple.com> Matthew Dempsky: POSIX defines that the _POSIX_C_SOURCE macros are to be set by user
code to specify what version of POSIX the system should provide. If
you want to check what version of POSIX is actually available, you're
supposed to test _POSIX_VERSION.

However, since sysconf() has been in POSIX since 1995, it's probably
safe to assume it's available on any system with a C++11 compiler,
especially if _SC_NPROCESSORS_ONLN is defined too. So no point in a
complicated preprocessor rule if just we unconditionally include
<unistd.h> (on non-Windows systems).

Also, I've added a #warning for to help porters detect when a suitable
implementation isn't detected at compile-time.

Howard: Matthew, can you patch CREDITS.TXT? Thanks.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
67444034ed83f5b27d66b082ec88f9d859b85cba 17-May-2013 Joerg Sonnenberger <joerg@bec.de> Create a weak pthread_create reference on NetBSD to not force a
dependency on libpthread for code that doesn't use threads itself.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@182161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
fc2f021bdd3fd69ff62bfc6ceb5c5264afd4ee7d 29-Mar-2013 Howard Hinnant <hhinnant@apple.com> Bruce Mitchener, Jr.: Port to emscripten. Fixes http://llvm.org/bugs/show_bug.cgi?id=15624.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
db4d478ff421cd1b1be254264367ceceebf39481 28-Mar-2013 Howard Hinnant <hhinnant@apple.com> Fix a few warnings/errors for compiling with -fno-exceptions.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
53e27639669f8f05c77ea4ef60063667d31dd674 18-Mar-2013 Marshall Clow <mclow@qualcomm.com> Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
a22d2addb1287a7642bfcb211ae2cb21890d1cbd 18-Mar-2013 Marshall Clow <mclow@qualcomm.com> Removed raw references to _WIN32; now just check to see if it is defined.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
b18165e704640ab7c4e2798529e0829bfbd29c3c 07-Feb-2013 Marshall Clow <mclow@qualcomm.com> Belt and suspenders when calling sysconf

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
d854ce6bfaa35c4079872dc68ba18ac1fe7f49e2 07-Feb-2013 Marshall Clow <mclow@qualcomm.com> Another libc++ warning suppression on Linux; no functionality change

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
5f767b7b28b28a1cd1d9950e3dd4b7bedf555d02 28-Dec-2012 Howard Hinnant <hhinnant@apple.com> Saleem Abdulrasool: cleanup a few more compile warnings emitted by GCC.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
cf115d2cc6bb658db58f4b0b7a2da078a18a62ef 30-Aug-2012 Howard Hinnant <hhinnant@apple.com> Change sleep_for, sleep_until, and the condition_variable timed wait
functions to protect against duration and time_point overflow. Since
we're about to wait anyway, we can afford to spend a few more cycles on
this checking. I purposefully did not treat the timed try_locks with
overflow checking. This fixes
http://llvm.org/bugs/show_bug.cgi?id=13721 . I'm unsure if the standard
needs clarification in this area, or if this is simply QOI. The
<chrono> facilities were never intended to overflow check, but just to
not overflow if durations stayed within +/- 292 years.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
403f91ad2cb76585f336faaab4812ff3ac5d27de 02-Aug-2012 Howard Hinnant <hhinnant@apple.com> Andrew Morrow: The attached patch is an attempt to implement
std::thread::hardware_concurrency for platforms that don't offer
sysctl, but do provide a POSIX sysconf and _SC_NPROCESSORS_ONLN.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@161190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
6e1d851be868839fa0ce3fecbd7edeeac82a074f 21-Jul-2012 Howard Hinnant <hhinnant@apple.com> noexcept applied to <thread>.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
997e4541395abd2db274c3bda04beaf5085e746f 29-Feb-2012 David Chisnall <csdavec@swan.ac.uk> Solaris port. Currently sees around 200 test failures, mostly related to
Solaris not providing some of the locales that the test suite uses.

Note: This depends on an xlocale (partial) implementation for Solaris and a
couple of fixed standard headers. These will be committed to a branch later
today.



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
ec3773c2dadbeadfc5def927116c2ee9d9c53066 01-Dec-2011 Howard Hinnant <hhinnant@apple.com> Quash a whole bunch of warnings

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
6cd05eeb35636c33a5cd951a7b5501f51611b469 23-Sep-2011 Howard Hinnant <hhinnant@apple.com> Work on Windows port by Ruben Van Boxem

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
2d72b1e393e35d61917d6d0ce069482ab11e96d1 17-Dec-2010 Howard Hinnant <hhinnant@apple.com> Effort to reduce the number of exported symbols

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@122057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
b64f8b07c104c6cc986570ac8ee0ed16a9f23976 16-Nov-2010 Howard Hinnant <hhinnant@apple.com> license change

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
5306d68019dd52a3dc3989ff02958e3f21e9655c 14-Oct-2010 Howard Hinnant <hhinnant@apple.com> Convert __thread_local_data to the singleton pattern

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@116500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
e6e4d015530014978920fa46cfe294518dc3490a 03-Sep-2010 Howard Hinnant <hhinnant@apple.com> [futures.atomic_future] and notify_all_at_thread_exit. This completes the header <future> and all of Chapter 30 (for C++0x enabled compilers).

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
47499b162ae741a247e5f89b7bdb513e51c3648a 27-Aug-2010 Howard Hinnant <hhinnant@apple.com> future continues ...

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@112284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
16e6e1d72fd6a10fc165eba4ca4ed2fa7c45df78 22-Aug-2010 Howard Hinnant <hhinnant@apple.com> Fixing whitespace problems

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@111751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
d444470d6cd1cad554139c4ba7f3c4f3fe921a5d 11-Aug-2010 Howard Hinnant <hhinnant@apple.com> now works with -fno-exceptions and -fno-rtti

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@110828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
0bfe8809b4805696036c5801f06a652402088505 25-May-2010 Howard Hinnant <hhinnant@apple.com> For compiling on FreeBSD

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@104616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
adff4895b2746f30b271bc219713e7ded5ae9677 24-May-2010 Howard Hinnant <hhinnant@apple.com> patch by Jeffrey Yasskin for porting to Ubuntu Hardy. Everything was accepted except there were some bug fixes needed in <locale> for the __nolocale_* series. For the apple branch I ended up using templates instead of the var_args solution because it seemed both safer and more efficient.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@104516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
f5256e16dfc425c1d466f6308d4026d529ce9e0b 11-May-2010 Howard Hinnant <hhinnant@apple.com> Wiped out some non-ascii characters that snuck into the copyright.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp
bc8d3f97eb5c958007f2713238472e0c1c8fe02c 11-May-2010 Howard Hinnant <hhinnant@apple.com> libcxx initial import

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/thread.cpp