From 630d52ca0a88d173f89634a5d7dd8aee07d04d80 Mon Sep 17 00:00:00 2001 From: ro Date: Wed, 2 Nov 2011 15:28:43 +0000 Subject: Move gthr to toplevel libgcc gcc: * gthr-single.h, gthr.h: Move to ../libgcc. * gthr-aix.h: Move to ../libgcc/config/rs6000. * gthr-dce.h: Move to ../libgcc/config/pa. * gthr-lynx.h: Move to ../libgcc/config. * gthr-mipssde.h: Move to ../libgcc/config/mips. * gthr-posix.h: Move to ../libgcc/config. * gthr-rtems.h: Likewise. * gthr-tpf.h: Move to ../libgcc/config/s390. * gthr-vxworks.h: Move to ../libgcc/config. * gthr-win32.h: Move to ../libgcc/config/i386. * configure.ac (gthread_flags): Remove (gthr-default.h): Don't create. (thread_file): Don't substitute. * configure: Regenerate. * Makefile.in (GCC_THREAD_FILE): Remove. (GTHREAD_FLAGS): Remove. (libgcc.mvars): Remove GTHREAD_FLAGS. * config/t-vxworks (EXTRA_HEADERS): Remove. gcc/po: * EXCLUDES (gthr-aix.h, gthr-dce.h, gthr-posix.c, gthr-posix.h) (gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h) (gthr-win32.h, gthr.h): Remove. libgcc: * gthr-single.h, gthr.h: New files. * config/gthr-lynx.h, config/gthr-posix.h., config/gthr-rtems.h, config/gthr-vxworks.h, config/i386/gthr-win32.h, config/mips/gthr-mipssde.h, config/pa/gthr-dce.h, config/rs6000/gthr-aix.h, config/s390/gthr-tpf.h: New files. * config/i386/gthr-win32.c: Include "gthr-win32.h". * configure.ac (thread_header): New variable. Set it depending on target_thread_file. (gthr-default.h): Link from $thread_header. * configure: Regenerate. * Makefile.in (LIBGCC2_CFLAGS): Remove $(GTHREAD_FLAGS). libgfortran: * Makefile.am (AM_CPPFLAGS): Add -I$(srcdir)/$(MULTISRCTOP)../libgcc, -I$(MULTIBUILDTOP)../libgcc. * Makefile.in: Regenerate. * acinclude.m4 (LIBGFOR_CHECK_GTHR_DEFAULT): Remove. * configure.ac (LIBGFOR_CHECK_GTHR_DEFAULT): Likewise. * configure: Regenerate. * config.h.in: Regenerate. libobjc: * Makefile.in (INCLUDES): Add -I$(MULTIBUILDTOP)../libgcc. * configure.ac (target_thread_file, HAVE_GTHR_DEFAULT): Remove. * configure: Regenerate. * config.h.in: Regenerate. libstdc++-v3: * acinclude.m4 (GLIBCXX_CONFIGURE): Determine and substitute toplevel_builddir. (GLIBCXX_ENABLE_THREADS): Remove glibcxx_thread_h, HAVE_GTHR_DEFAULT, enable_thread. (GLIBCXX_CHECK_GTHREADS): Reflect gthr move to libgcc. * include/Makefile.am (thread_host_headers): Remove ${host_builddir}/gthr-tpf.h. (${host_builddir}/gthr.h): Reflect gthr move to libgcc. Use $<. (${host_builddir}/gthr-single.h): Likewise. (${host_builddir}/gthr-posix.h): Likewise. (${host_builddir}/gthr-tpf.h): Remove. (${host_builddir}/gthr-default.h): Likewise. * configure, config.h.in: Regenerate. * Makefile.in, doc/Makefile.in, include/Makefile.in, libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in, src/Makefile.intestsuite/Makefile.in: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180776 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/src/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libstdc++-v3/src') diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index 5d31fb20c41..c52e5c4df61 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -277,7 +277,6 @@ glibcxx_builddir = @glibcxx_builddir@ glibcxx_localedir = @glibcxx_localedir@ glibcxx_prefixdir = @glibcxx_prefixdir@ glibcxx_srcdir = @glibcxx_srcdir@ -glibcxx_thread_h = @glibcxx_thread_h@ glibcxx_toolexecdir = @glibcxx_toolexecdir@ glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@ gxx_include_dir = @gxx_include_dir@ @@ -317,6 +316,7 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +toplevel_builddir = @toplevel_builddir@ toplevel_srcdir = @toplevel_srcdir@ # May be used by various substitution variables. -- cgit v1.2.1 From 1cd6e20de6e40ead3795087811f151f00b06e016 Mon Sep 17 00:00:00 2001 From: amacleod Date: Sun, 6 Nov 2011 14:55:48 +0000 Subject: Check in patch/merge from cxx-mem-model Branch git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181031 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/src/Makefile.am | 12 +- libstdc++-v3/src/Makefile.in | 18 +-- libstdc++-v3/src/atomic.cc | 146 ----------------------- libstdc++-v3/src/compatibility-atomic-c++0x.cc | 158 +++++++++++++++++++++++++ 4 files changed, 173 insertions(+), 161 deletions(-) delete mode 100644 libstdc++-v3/src/atomic.cc create mode 100644 libstdc++-v3/src/compatibility-atomic-c++0x.cc (limited to 'libstdc++-v3/src') diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index 5a6cb970822..eefa6e269a0 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -190,13 +190,13 @@ endif # Sources present in the src directory, always present. sources = \ - atomic.cc \ bitmap_allocator.cc \ pool_allocator.cc \ mt_allocator.cc \ codecvt.cc \ compatibility.cc \ compatibility-c++0x.cc \ + compatibility-atomic-c++0x.cc \ compatibility-debug_list.cc \ compatibility-debug_list-2.cc \ compatibility-list.cc \ @@ -323,6 +323,11 @@ compatibility-c++0x.lo: compatibility-c++0x.cc compatibility-c++0x.o: compatibility-c++0x.cc $(CXXCOMPILE) -std=gnu++0x -c $< +compatibility-atomic-c++0x.lo: compatibility-atomic-c++0x.cc + $(LTCXXCOMPILE) -std=gnu++0x -c $< +compatibility-atomic-c++0x.o: compatibility-atomic-c++0x.cc + $(CXXCOMPILE) -std=gnu++0x -c $< + functional.lo: functional.cc $(LTCXXCOMPILE) -std=gnu++0x -c $< functional.o: functional.cc @@ -343,11 +348,6 @@ limits.lo: limits.cc limits.o: limits.cc $(CXXCOMPILE) -std=gnu++0x -c $< -atomic.lo: atomic.cc - $(LTCXXCOMPILE) -std=gnu++0x -c $< -atomic.o: atomic.cc - $(CXXCOMPILE) -std=gnu++0x -c $< - fstream-inst.lo: fstream-inst.cc $(LTCXXCOMPILE) -std=gnu++0x -c $< fstream-inst.o: fstream-inst.cc diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index c52e5c4df61..4b2646e4a05 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -105,9 +105,9 @@ am__objects_1 = atomicity.lo codecvt_members.lo collate_members.lo \ @ENABLE_PARALLEL_TRUE@ compatibility-parallel_list-2.lo am__objects_5 = basic_file.lo c++locale.lo $(am__objects_2) \ $(am__objects_3) $(am__objects_4) -am__objects_6 = atomic.lo bitmap_allocator.lo pool_allocator.lo \ - mt_allocator.lo codecvt.lo compatibility.lo \ - compatibility-c++0x.lo compatibility-debug_list.lo \ +am__objects_6 = bitmap_allocator.lo pool_allocator.lo mt_allocator.lo \ + codecvt.lo compatibility.lo compatibility-c++0x.lo \ + compatibility-atomic-c++0x.lo compatibility-debug_list.lo \ compatibility-debug_list-2.lo compatibility-list.lo \ compatibility-list-2.lo complex_io.lo ctype.lo debug.lo \ functexcept.lo functional.lo globals_io.lo hash_c++0x.lo \ @@ -407,13 +407,13 @@ host_sources_extra = \ # Sources present in the src directory, always present. sources = \ - atomic.cc \ bitmap_allocator.cc \ pool_allocator.cc \ mt_allocator.cc \ codecvt.cc \ compatibility.cc \ compatibility-c++0x.cc \ + compatibility-atomic-c++0x.cc \ compatibility-debug_list.cc \ compatibility-debug_list-2.cc \ compatibility-list.cc \ @@ -917,6 +917,11 @@ compatibility-c++0x.lo: compatibility-c++0x.cc compatibility-c++0x.o: compatibility-c++0x.cc $(CXXCOMPILE) -std=gnu++0x -c $< +compatibility-atomic-c++0x.lo: compatibility-atomic-c++0x.cc + $(LTCXXCOMPILE) -std=gnu++0x -c $< +compatibility-atomic-c++0x.o: compatibility-atomic-c++0x.cc + $(CXXCOMPILE) -std=gnu++0x -c $< + functional.lo: functional.cc $(LTCXXCOMPILE) -std=gnu++0x -c $< functional.o: functional.cc @@ -937,11 +942,6 @@ limits.lo: limits.cc limits.o: limits.cc $(CXXCOMPILE) -std=gnu++0x -c $< -atomic.lo: atomic.cc - $(LTCXXCOMPILE) -std=gnu++0x -c $< -atomic.o: atomic.cc - $(CXXCOMPILE) -std=gnu++0x -c $< - fstream-inst.lo: fstream-inst.cc $(LTCXXCOMPILE) -std=gnu++0x -c $< fstream-inst.o: fstream-inst.cc diff --git a/libstdc++-v3/src/atomic.cc b/libstdc++-v3/src/atomic.cc deleted file mode 100644 index 5752d39feed..00000000000 --- a/libstdc++-v3/src/atomic.cc +++ /dev/null @@ -1,146 +0,0 @@ -// Support for atomic operations -*- C++ -*- - -// Copyright (C) 2008, 2009, 2010, 2011 -// Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -#include "gstdint.h" -#include -#include - -#define LOGSIZE 4 - -namespace -{ -#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) - std::mutex& - get_atomic_mutex() - { - static std::mutex atomic_mutex; - return atomic_mutex; - } -#endif - - std::__atomic_flag_base flag_table[ 1 << LOGSIZE ] = - { - ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, - ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, - ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, - ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, - }; -} // anonymous namespace - -namespace std _GLIBCXX_VISIBILITY(default) -{ -_GLIBCXX_BEGIN_NAMESPACE_VERSION - - namespace __atomic0 - { - bool - atomic_flag::test_and_set(memory_order) noexcept - { -#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) - lock_guard __lock(get_atomic_mutex()); -#endif - bool result = _M_i; - _M_i = true; - return result; - } - - void - atomic_flag::clear(memory_order) noexcept - { -#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) - lock_guard __lock(get_atomic_mutex()); -#endif - _M_i = false; - } - - _GLIBCXX_BEGIN_EXTERN_C - - bool - atomic_flag_test_and_set_explicit(__atomic_flag_base* __a, - memory_order __m) _GLIBCXX_NOTHROW - { - atomic_flag* d = static_cast(__a); - return d->test_and_set(__m); - } - - void - atomic_flag_clear_explicit(__atomic_flag_base* __a, - memory_order __m) _GLIBCXX_NOTHROW - { - atomic_flag* d = static_cast(__a); - return d->clear(__m); - } - - void - __atomic_flag_wait_explicit(__atomic_flag_base* __a, - memory_order __x) _GLIBCXX_NOTHROW - { - while (atomic_flag_test_and_set_explicit(__a, __x)) - { }; - } - - _GLIBCXX_CONST __atomic_flag_base* - __atomic_flag_for_address(const volatile void* __z) _GLIBCXX_NOTHROW - { - uintptr_t __u = reinterpret_cast(__z); - __u += (__u >> 2) + (__u << 4); - __u += (__u >> 7) + (__u << 5); - __u += (__u >> 17) + (__u << 13); - if (sizeof(uintptr_t) > 4) - __u += (__u >> 31); - __u &= ~((~uintptr_t(0)) << LOGSIZE); - return flag_table + __u; - } - - _GLIBCXX_END_EXTERN_C - - } // namespace __atomic0 - -_GLIBCXX_END_NAMESPACE_VERSION -} // namespace - - -// XXX GLIBCXX_ABI Deprecated -// gcc-4.5.0 -// signature changes - -// The rename syntax for default exported names is -// asm (".symver name1,exportedname@GLIBCXX_3.4") -// asm (".symver name2,exportedname@@GLIBCXX_3.4.5") -// In the future, GLIBCXX_ABI > 6 should remove all uses of -// _GLIBCXX_*_SYMVER macros in this file. - -#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \ - && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ - && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) - -#define _GLIBCXX_ASM_SYMVER(cur, old, version) \ - asm (".symver " #cur "," #old "@@" #version); - -_GLIBCXX_ASM_SYMVER(_ZNSt9__atomic011atomic_flag5clearESt12memory_order, _ZNVSt9__atomic011atomic_flag5clearESt12memory_order, GLIBCXX_3.4.11) - -_GLIBCXX_ASM_SYMVER(_ZNSt9__atomic011atomic_flag12test_and_setESt12memory_order, _ZNVSt9__atomic011atomic_flag12test_and_setESt12memory_order, GLIBCXX_3.4.11) - -#endif diff --git a/libstdc++-v3/src/compatibility-atomic-c++0x.cc b/libstdc++-v3/src/compatibility-atomic-c++0x.cc new file mode 100644 index 00000000000..1ee0d7e35a8 --- /dev/null +++ b/libstdc++-v3/src/compatibility-atomic-c++0x.cc @@ -0,0 +1,158 @@ +// compatibility -*- C++ -*- + +// Copyright (C) 2008, 2009, 2010, 2011 +// Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +#include "gstdint.h" +#include +#include + +// XXX GLIBCXX_ABI Deprecated +// gcc-4.7.0 + +#define LOGSIZE 4 + +namespace +{ +#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) + std::mutex& + get_atomic_mutex() + { + static std::mutex atomic_mutex; + return atomic_mutex; + } +#endif + + std::__atomic_flag_base flag_table[ 1 << LOGSIZE ] = + { + ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, + ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, + ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, + ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, + }; +} // anonymous namespace + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + namespace __atomic0 + { + + struct atomic_flag : public __atomic_flag_base + { + bool + test_and_set(memory_order) noexcept; + + void + clear(memory_order) noexcept; + }; + + bool + atomic_flag::test_and_set(memory_order) noexcept + { +#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) + lock_guard __lock(get_atomic_mutex()); +#endif + bool result = _M_i; + _M_i = true; + return result; + } + + void + atomic_flag::clear(memory_order) noexcept + { +#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) + lock_guard __lock(get_atomic_mutex()); +#endif + _M_i = false; + } + } // namespace __atomic0 + + _GLIBCXX_BEGIN_EXTERN_C + + bool + atomic_flag_test_and_set_explicit(__atomic_flag_base* __a, + memory_order __m) _GLIBCXX_NOTHROW + { + atomic_flag* d = static_cast(__a); + return d->test_and_set(__m); + } + + void + atomic_flag_clear_explicit(__atomic_flag_base* __a, + memory_order __m) _GLIBCXX_NOTHROW + { + atomic_flag* d = static_cast(__a); + return d->clear(__m); + } + + void + __atomic_flag_wait_explicit(__atomic_flag_base* __a, + memory_order __x) _GLIBCXX_NOTHROW + { + while (atomic_flag_test_and_set_explicit(__a, __x)) + { }; + } + + _GLIBCXX_CONST __atomic_flag_base* + __atomic_flag_for_address(const volatile void* __z) _GLIBCXX_NOTHROW + { + uintptr_t __u = reinterpret_cast(__z); + __u += (__u >> 2) + (__u << 4); + __u += (__u >> 7) + (__u << 5); + __u += (__u >> 17) + (__u << 13); + if (sizeof(uintptr_t) > 4) + __u += (__u >> 31); + __u &= ~((~uintptr_t(0)) << LOGSIZE); + return flag_table + __u; + } + + _GLIBCXX_END_EXTERN_C + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + + +// XXX GLIBCXX_ABI Deprecated +// gcc-4.5.0 +// signature changes + +// The rename syntax for default exported names is +// asm (".symver name1,exportedname@GLIBCXX_3.4") +// asm (".symver name2,exportedname@@GLIBCXX_3.4.5") +// In the future, GLIBCXX_ABI > 6 should remove all uses of +// _GLIBCXX_*_SYMVER macros in this file. + +#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \ + && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ + && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) + +#define _GLIBCXX_ASM_SYMVER(cur, old, version) \ + asm (".symver " #cur "," #old "@@" #version); + +_GLIBCXX_ASM_SYMVER(_ZNSt9__atomic011atomic_flag5clearESt12memory_order, _ZNVSt9__atomic011atomic_flag5clearESt12memory_order, GLIBCXX_3.4.11) + +_GLIBCXX_ASM_SYMVER(_ZNSt9__atomic011atomic_flag12test_and_setESt12memory_order, _ZNVSt9__atomic011atomic_flag12test_and_setESt12memory_order, GLIBCXX_3.4.11) + +#endif -- cgit v1.2.1 From da22c41abba8c6d2fddbe78b50f2343f9f1cc79c Mon Sep 17 00:00:00 2001 From: redi Date: Mon, 7 Nov 2011 13:45:03 +0000 Subject: * acinclude.m4 (GLIBCXX_CHECK_SC_NPROC_ONLN): Define. (GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP): Define. (GLIBCXX_CHECK_SYSCTL_HW_NCPU): Define. * configure.ac: Use new checks. * configure: Regenerate. * config.h.in: Regenerate. * src/thread.cc: Check new config macros. * testsuite/lib/libstdc++.exp: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181084 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/src/thread.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'libstdc++-v3/src') diff --git a/libstdc++-v3/src/thread.cc b/libstdc++-v3/src/thread.cc index 09e7fc5909d..ff034b16143 100644 --- a/libstdc++-v3/src/thread.cc +++ b/libstdc++-v3/src/thread.cc @@ -30,9 +30,27 @@ #if defined(_GLIBCXX_USE_GET_NPROCS) # include # define _GLIBCXX_NPROCS get_nprocs() +#elif defined(_GLIBCXX_USE_PTHREADS_NUM_PROCESSORS_NP) +# define _GLIBCXX_NPROCS pthread_num_processors_np() +#elif defined(_GLIBCXX_USE_SYSCTL_HW_NCPU) +# include +# include +static inline int get_nprocs() +{ + int count; + size_t size = sizeof(count); + int mib[] = { CTL_HW, HW_NCPU }; + if (!sysctl(mib, 2, &count, &size, NULL, 0)) + return count; + return 0; +} +# define _GLIBCXX_NPROCS get_nprocs() #elif defined(_GLIBCXX_USE_SC_NPROCESSORS_ONLN) # include # define _GLIBCXX_NPROCS sysconf(_SC_NPROCESSORS_ONLN) +#elif defined(_GLIBCXX_USE_SC_NPROC_ONLN) +# include +# define _GLIBCXX_NPROCS sysconf(_SC_NPROC_ONLN) #else # define _GLIBCXX_NPROCS 0 #endif -- cgit v1.2.1