+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>
* docs/html/ext/mt_allocator.html: Add docs for _Tune.
#include <locale>
#include <pthread.h>
-
+#include <testsuite_hooks.h>
+
const int max_thread_count = 20;
//const int max_loop_count = 1000000; // orig value
const int max_loop_count = 100000;
std::locale loc_c = std::locale::classic();
std::locale loc[max_locales];
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)
{
#include <locale>
#include <pthread.h>
-
+#include <testsuite_hooks.h>
+
const int max_thread_count = 20;
//const int max_loop_count = 1000000; // orig value
const int max_loop_count = 100000;
pthread_t tid[max_thread_count];
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++)
pthread_create(&tid[i], NULL, thread_main, 0);