Commit 8063a355 by Paolo Carlini Committed by Paolo Carlini

12658_thread-1.cc, [...]: Use __gnu_test::try_named_locale.

2004-07-14  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/locale/cons/12658_thread-1.cc, 12658_thread-2.cc:
	Use __gnu_test::try_named_locale.

From-SVN: r84687
parent 39cab019
2004-07-14 Paolo Carlini <pcarlini@suse.de>
* testsuite/22_locale/locale/cons/12658_thread-1.cc,
12658_thread-2.cc: Use __gnu_test::try_named_locale.
2004-07-13 Benjamin Kosnik <bkoz@redhat.com> 2004-07-13 Benjamin Kosnik <bkoz@redhat.com>
* docs/html/ext/mt_allocator.html: Add docs for _Tune. * docs/html/ext/mt_allocator.html: Add docs for _Tune.
......
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
#include <locale> #include <locale>
#include <pthread.h> #include <pthread.h>
#include <testsuite_hooks.h>
const int max_thread_count = 20; const int max_thread_count = 20;
//const int max_loop_count = 1000000; // orig value //const int max_loop_count = 1000000; // orig value
const int max_loop_count = 100000; const int max_loop_count = 100000;
...@@ -39,7 +40,7 @@ void* thread_main(void*) ...@@ -39,7 +40,7 @@ void* thread_main(void*)
std::locale loc_c = std::locale::classic(); std::locale loc_c = std::locale::classic();
std::locale loc[max_locales]; std::locale loc[max_locales];
for (int j = 0; j < max_locales; ++j) for (int j = 0; j < max_locales; ++j)
loc[j] = std::locale(j % 2 ? "en_US" : "fr_FR"); loc[j] = __gnu_test::try_named_locale(j % 2 ? "en_US" : "fr_FR");
for (int i = 0; i < max_loop_count; ++i) for (int i = 0; i < max_loop_count; ++i)
{ {
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
#include <locale> #include <locale>
#include <pthread.h> #include <pthread.h>
#include <testsuite_hooks.h>
const int max_thread_count = 20; const int max_thread_count = 20;
//const int max_loop_count = 1000000; // orig value //const int max_loop_count = 1000000; // orig value
const int max_loop_count = 100000; const int max_loop_count = 100000;
...@@ -51,7 +52,7 @@ main() ...@@ -51,7 +52,7 @@ main()
pthread_t tid[max_thread_count]; pthread_t tid[max_thread_count];
for (int j = 0; j < max_locales; ++j) for (int j = 0; j < max_locales; ++j)
loc[j] = std::locale(j % 2 ? "en_US" : "fr_FR"); loc[j] = __gnu_test::try_named_locale(j % 2 ? "en_US" : "fr_FR");
for (int i = 0; i < max_thread_count; i++) for (int i = 0; i < max_thread_count; i++)
pthread_create(&tid[i], NULL, thread_main, 0); pthread_create(&tid[i], NULL, thread_main, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment