diff options
author | Paolo Carlini <pcarlini@suse.de> | 2004-07-14 14:01:45 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2004-07-14 14:01:45 +0000 |
commit | 8063a3559dc757ad8336b03f693856b28e19c86c (patch) | |
tree | a5ae11c38b94440d9f2e48a92c3c95a95c49e7d8 | |
parent | 39cab01994f20e38587d0ef91c9c87f2ef537078 (diff) | |
download | gcc-8063a3559dc757ad8336b03f693856b28e19c86c.zip gcc-8063a3559dc757ad8336b03f693856b28e19c86c.tar.gz gcc-8063a3559dc757ad8336b03f693856b28e19c86c.tar.bz2 |
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
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc | 5 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc | 5 |
3 files changed, 11 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index d55a470..a4c2ccc 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +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. diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc index 8c39b50..216d068 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc @@ -26,7 +26,8 @@ #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; @@ -39,7 +40,7 @@ void* thread_main(void*) 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) { diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc index 064a9b9..a48c4a8 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-2.cc @@ -24,7 +24,8 @@ #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; @@ -51,7 +52,7 @@ main() 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); |