diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-11-28 08:37:50 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-11-28 08:39:41 +0100 |
commit | 26efc220a13aa3413f6e55e311e8991445104f82 (patch) | |
tree | e9513ed2b658d0bfdd89b5e79bfcee0e3a3f0f13 /configure.ac | |
parent | a89221873a3ee2451c73b41bbe2d99d36f439d31 (diff) | |
parent | f7f7e2cd340c088e82d09090eb275b98b34a9812 (diff) | |
download | bitcoin-26efc220a13aa3413f6e55e311e8991445104f82.tar.xz |
Merge #11722: Switched sync.{cpp,h} to std threading primitives.
f7f7e2c threads: add a thread_local autoconf check (Cory Fields)
bba9bd0 Switched sync.{cpp,h} to std threading primitives. (Thomas Snider)
Pull request description:
Replaced boost threading primitives with the std equivalents.
Tree-SHA512: 72d10f9e48bfcf1db87e4a88bc698ef98eba0b29fe904570391b34a6ea1ffad474b7f192e70e3588a30e448f70f244eb4ddc5f24412a0bde2b564e76274160a5
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 8e5561243a..a05896edea 100644 --- a/configure.ac +++ b/configure.ac @@ -659,6 +659,28 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ ] ) +TEMP_LDFLAGS="$LDFLAGS" +LDFLAGS="$TEMP_LDFLAGS $PTHREAD_CFLAGS" +AC_MSG_CHECKING([for thread_local support]) +AC_LINK_IFELSE([AC_LANG_SOURCE([ + #include <thread> + static thread_local int foo = 0; + static void run_thread() { foo++;} + int main(){ + for(int i = 0; i < 10; i++) { std::thread(run_thread).detach();} + return foo; + } + ])], + [ + AC_DEFINE(HAVE_THREAD_LOCAL,1,[Define if thread_local is supported.]) + AC_MSG_RESULT(yes) + ], + [ + AC_MSG_RESULT(no) + ] +) +LDFLAGS="$TEMP_LDFLAGS" + # Check for different ways of gathering OS randomness AC_MSG_CHECKING(for Linux getrandom syscall) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h> |