aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/thread
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/thread')
-rw-r--r--libstdc++-v3/testsuite/thread/pthread1.cc4
-rw-r--r--libstdc++-v3/testsuite/thread/pthread2.cc5
-rw-r--r--libstdc++-v3/testsuite/thread/pthread3.cc5
-rw-r--r--libstdc++-v3/testsuite/thread/pthread4.cc4
-rw-r--r--libstdc++-v3/testsuite/thread/pthread5.cc4
-rw-r--r--libstdc++-v3/testsuite/thread/pthread6.cc5
-rw-r--r--libstdc++-v3/testsuite/thread/pthread7-rope.cc14
7 files changed, 5 insertions, 36 deletions
diff --git a/libstdc++-v3/testsuite/thread/pthread1.cc b/libstdc++-v3/testsuite/thread/pthread1.cc
index 1b225f202c6..26d198a755e 100644
--- a/libstdc++-v3/testsuite/thread/pthread1.cc
+++ b/libstdc++-v3/testsuite/thread/pthread1.cc
@@ -34,7 +34,6 @@
// Do not include <pthread.h> explicitly; if threads are properly
// configured for the port, then it is picked up free from STL headers.
-#if __GTHREADS
using namespace std;
const int thread_cycles = 10;
@@ -135,6 +134,3 @@ main ()
return 0;
}
-#else
-int main (void) {}
-#endif
diff --git a/libstdc++-v3/testsuite/thread/pthread2.cc b/libstdc++-v3/testsuite/thread/pthread2.cc
index 7fbdfc03aeb..7a0efd067a2 100644
--- a/libstdc++-v3/testsuite/thread/pthread2.cc
+++ b/libstdc++-v3/testsuite/thread/pthread2.cc
@@ -28,8 +28,6 @@
// Do not include <pthread.h> explicitly; if threads are properly
// configured for the port, then it is picked up free from STL headers.
-#if __GTHREADS
-
const int max_thread_count = 2;
const int max_loop_count = 1000000;
@@ -62,6 +60,3 @@ main()
return 0;
}
-#else
-int main (void) {}
-#endif
diff --git a/libstdc++-v3/testsuite/thread/pthread3.cc b/libstdc++-v3/testsuite/thread/pthread3.cc
index ca8f77147e7..4696fb76cdc 100644
--- a/libstdc++-v3/testsuite/thread/pthread3.cc
+++ b/libstdc++-v3/testsuite/thread/pthread3.cc
@@ -28,8 +28,6 @@
// Do not include <pthread.h> explicitly; if threads are properly
// configured for the port, then it is picked up free from STL headers.
-#if __GTHREADS
-
const int max_thread_count = 2;
const int max_loop_count = 1000000;
@@ -59,6 +57,3 @@ main()
return 0;
}
-#else
-int main (void) {}
-#endif
diff --git a/libstdc++-v3/testsuite/thread/pthread4.cc b/libstdc++-v3/testsuite/thread/pthread4.cc
index be1ae680fa7..a9ec9b84e38 100644
--- a/libstdc++-v3/testsuite/thread/pthread4.cc
+++ b/libstdc++-v3/testsuite/thread/pthread4.cc
@@ -30,7 +30,6 @@
// Do not include <pthread.h> explicitly; if threads are properly
// configured for the port, then it is picked up free from STL headers.
-#if __GTHREADS
using namespace std;
static list<string> foo;
@@ -113,6 +112,3 @@ main (void)
return 0;
}
-#else
-int main (void) {}
-#endif
diff --git a/libstdc++-v3/testsuite/thread/pthread5.cc b/libstdc++-v3/testsuite/thread/pthread5.cc
index b950542fd61..93f03a22761 100644
--- a/libstdc++-v3/testsuite/thread/pthread5.cc
+++ b/libstdc++-v3/testsuite/thread/pthread5.cc
@@ -31,7 +31,6 @@
// Do not include <pthread.h> explicitly; if threads are properly
// configured for the port, then it is picked up free from STL headers.
-#if __GTHREADS
#ifdef _GLIBCXX_HAVE_UNISTD_H
#include <unistd.h> // To test for _POSIX_THREAD_PRIORITY_SCHEDULING
#endif
@@ -130,6 +129,3 @@ main ()
return (0);
}
-#else
-int main (void) {}
-#endif
diff --git a/libstdc++-v3/testsuite/thread/pthread6.cc b/libstdc++-v3/testsuite/thread/pthread6.cc
index e0fee71deac..ba8c341c3f8 100644
--- a/libstdc++-v3/testsuite/thread/pthread6.cc
+++ b/libstdc++-v3/testsuite/thread/pthread6.cc
@@ -30,8 +30,6 @@
// Do not include <pthread.h> explicitly; if threads are properly
// configured for the port, then it is picked up free from STL headers.
-#if __GTHREADS
-
const int max_thread_count = 8;
const int loops = 100000;
@@ -94,6 +92,3 @@ main (void)
return 0;
}
-#else
-int main (void) {}
-#endif
diff --git a/libstdc++-v3/testsuite/thread/pthread7-rope.cc b/libstdc++-v3/testsuite/thread/pthread7-rope.cc
index 2f401344ff4..307973c202d 100644
--- a/libstdc++-v3/testsuite/thread/pthread7-rope.cc
+++ b/libstdc++-v3/testsuite/thread/pthread7-rope.cc
@@ -29,13 +29,12 @@
// Do not include <pthread.h> explicitly; if threads are properly
// configured for the port, then it is picked up free from STL headers.
-#if __GTHREADS
-
const int max_thread_count = 4;
const int max_loop_count = 10000;
-__gnu_cxx::crope foo2;
-__gnu_cxx::crope foo4;
+typedef __gnu_cxx::rope<char, std::allocator<char> > rope_type;
+rope_type foo2;
+rope_type foo4;
void* thread_main(void *)
{
@@ -73,7 +72,7 @@ main()
pthread_setconcurrency (max_thread_count);
#endif
- __gnu_cxx::crope foo;
+ rope_type foo;
foo += "bar";
foo += "baz";
foo += "bongle";
@@ -89,7 +88,7 @@ main()
VERIFY( !std::strcmp (data2, "bar2baz2bongle2") );
}
- __gnu_cxx::crope foo3 ("hello");
+ rope_type foo3 ("hello");
const char* data3 = foo3.c_str();
VERIFY( !std::strcmp (data3, "hello") );
@@ -112,6 +111,3 @@ main()
return 0;
}
-#else
-int main (void) {}
-#endif