From 6be50b17268cb6a9047bbd91c80b7bbb5ff701b8 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 18 Feb 2005 12:54:55 +0100 Subject: [PATCH] pthread1.cc: Do not invoke pthread_setconcurrency on Solaris 2.6 and below. * testsuite/thread/pthread1.cc: Do not invoke pthread_setconcurrency on Solaris 2.6 and below. * testsuite/thread/pthread2.cc: Likewise. * testsuite/thread/pthread3.cc: Likewise. * testsuite/thread/pthread4.cc: Likewise. * testsuite/thread/pthread5.cc: Likewise. * testsuite/thread/pthread6.cc: Likewise. * testsuite/thread/pthread7-rope.cc: Likewise. From-SVN: r95221 --- libstdc++-v3/ChangeLog | 11 +++++++++++ libstdc++-v3/testsuite/thread/pthread1.cc | 2 +- libstdc++-v3/testsuite/thread/pthread2.cc | 2 +- libstdc++-v3/testsuite/thread/pthread3.cc | 2 +- libstdc++-v3/testsuite/thread/pthread4.cc | 2 +- libstdc++-v3/testsuite/thread/pthread5.cc | 2 +- libstdc++-v3/testsuite/thread/pthread6.cc | 2 +- libstdc++-v3/testsuite/thread/pthread7-rope.cc | 2 +- 8 files changed, 18 insertions(+), 7 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 0fab8fb8b18e..d74d67226963 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,14 @@ +2005-02-18 Eric Botcazou + + * testsuite/thread/pthread1.cc: Do not invoke pthread_setconcurrency + on Solaris 2.6 and below. + * testsuite/thread/pthread2.cc: Likewise. + * testsuite/thread/pthread3.cc: Likewise. + * testsuite/thread/pthread4.cc: Likewise. + * testsuite/thread/pthread5.cc: Likewise. + * testsuite/thread/pthread6.cc: Likewise. + * testsuite/thread/pthread7-rope.cc: Likewise. + 2005-02-16 Paolo Carlini PR libstdc++/19829 diff --git a/libstdc++-v3/testsuite/thread/pthread1.cc b/libstdc++-v3/testsuite/thread/pthread1.cc index 1b225f202c60..acce015b18e9 100644 --- a/libstdc++-v3/testsuite/thread/pthread1.cc +++ b/libstdc++-v3/testsuite/thread/pthread1.cc @@ -112,7 +112,7 @@ main () task_queue* tq[thread_pairs]; -#if defined(__sun) && defined(__svr4__) +#if defined(__sun) && defined(__svr4__) && _XOPEN_VERSION >= 500 pthread_setconcurrency (thread_pairs * 2); #endif diff --git a/libstdc++-v3/testsuite/thread/pthread2.cc b/libstdc++-v3/testsuite/thread/pthread2.cc index 7fbdfc03aebc..7720808d928d 100644 --- a/libstdc++-v3/testsuite/thread/pthread2.cc +++ b/libstdc++-v3/testsuite/thread/pthread2.cc @@ -50,7 +50,7 @@ main() { pthread_t tid[max_thread_count]; -#if defined(__sun) && defined(__svr4__) +#if defined(__sun) && defined(__svr4__) && _XOPEN_VERSION >= 500 pthread_setconcurrency (max_thread_count); #endif diff --git a/libstdc++-v3/testsuite/thread/pthread3.cc b/libstdc++-v3/testsuite/thread/pthread3.cc index ca8f77147e78..b5cf4ceecbe9 100644 --- a/libstdc++-v3/testsuite/thread/pthread3.cc +++ b/libstdc++-v3/testsuite/thread/pthread3.cc @@ -47,7 +47,7 @@ main() { pthread_t tid[max_thread_count]; -#if defined(__sun) && defined(__svr4__) +#if defined(__sun) && defined(__svr4__) && _XOPEN_VERSION >= 500 pthread_setconcurrency (max_thread_count); #endif diff --git a/libstdc++-v3/testsuite/thread/pthread4.cc b/libstdc++-v3/testsuite/thread/pthread4.cc index be1ae680fa7e..4cf21e64e9c6 100644 --- a/libstdc++-v3/testsuite/thread/pthread4.cc +++ b/libstdc++-v3/testsuite/thread/pthread4.cc @@ -99,7 +99,7 @@ template class __gnu_cxx::__mt_alloc >; int main (void) { -#if defined(__sun) && defined(__svr4__) +#if defined(__sun) && defined(__svr4__) && _XOPEN_VERSION >= 500 pthread_setconcurrency (2); #endif diff --git a/libstdc++-v3/testsuite/thread/pthread5.cc b/libstdc++-v3/testsuite/thread/pthread5.cc index b950542fd619..72b50bf08564 100644 --- a/libstdc++-v3/testsuite/thread/pthread5.cc +++ b/libstdc++-v3/testsuite/thread/pthread5.cc @@ -101,7 +101,7 @@ main () int ids[NTHREADS]; void* status; -#if defined(__sun) && defined(__svr4__) +#if defined(__sun) && defined(__svr4__) && _XOPEN_VERSION >= 500 pthread_setconcurrency (NTHREADS); #endif diff --git a/libstdc++-v3/testsuite/thread/pthread6.cc b/libstdc++-v3/testsuite/thread/pthread6.cc index e0fee71deac6..caf371245f9a 100644 --- a/libstdc++-v3/testsuite/thread/pthread6.cc +++ b/libstdc++-v3/testsuite/thread/pthread6.cc @@ -82,7 +82,7 @@ main (void) { pthread_t tid[max_thread_count]; -#if defined(__sun) && defined(__svr4__) +#if defined(__sun) && defined(__svr4__) && _XOPEN_VERSION >= 500 pthread_setconcurrency (max_thread_count); #endif diff --git a/libstdc++-v3/testsuite/thread/pthread7-rope.cc b/libstdc++-v3/testsuite/thread/pthread7-rope.cc index 2f401344ff4d..bca733d8e0dd 100644 --- a/libstdc++-v3/testsuite/thread/pthread7-rope.cc +++ b/libstdc++-v3/testsuite/thread/pthread7-rope.cc @@ -69,7 +69,7 @@ main() pthread_t tid[max_thread_count]; -#if defined(__sun) && defined(__svr4__) +#if defined(__sun) && defined(__svr4__) && _XOPEN_VERSION >= 500 pthread_setconcurrency (max_thread_count); #endif -- 2.47.2