From fe7d4a35603a37f1e4688b3949c57799c2725cf4 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 18 Feb 2005 12:56:16 +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. From-SVN: r95223 --- libstdc++-v3/ChangeLog | 10 ++++++++++ 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 +- 7 files changed, 16 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a4405361487f..4b86f6391918 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,13 @@ +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. + 2005-02-02 Zack Weinberg Backport from mainline: diff --git a/libstdc++-v3/testsuite/thread/pthread1.cc b/libstdc++-v3/testsuite/thread/pthread1.cc index a6af93fbe9a5..d517ea9e1bea 100644 --- a/libstdc++-v3/testsuite/thread/pthread1.cc +++ b/libstdc++-v3/testsuite/thread/pthread1.cc @@ -107,7 +107,7 @@ main (int argc, char** argv) 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 2ce17b72ba9b..2692d010254f 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 70fd9ead58a8..a1175b76ae03 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 d4d03b3867c1..08d4f425ed8a 100644 --- a/libstdc++-v3/testsuite/thread/pthread4.cc +++ b/libstdc++-v3/testsuite/thread/pthread4.cc @@ -93,7 +93,7 @@ consume (void*) 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 955f3785a399..4d6364abb419 100644 --- a/libstdc++-v3/testsuite/thread/pthread5.cc +++ b/libstdc++-v3/testsuite/thread/pthread5.cc @@ -95,7 +95,7 @@ main (int argc, char *argv[]) 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 e5ea0f986171..ca11073a0033 100644 --- a/libstdc++-v3/testsuite/thread/pthread6.cc +++ b/libstdc++-v3/testsuite/thread/pthread6.cc @@ -77,7 +77,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 -- 2.47.2