diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-04-08 07:59:52 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2008-04-08 07:59:52 +0000 |
commit | e6e467b8352b6a62b8187fd241671eb55d0f6fc4 (patch) | |
tree | 2e7c2ddae1aa58a70c384e1d5b49d3ad198a2718 /locale/setlocale.c | |
parent | 09b731ac2b1b5e79050991f6a9dab964f9a7a60f (diff) |
Updated to fedora-glibc-20080408T0706
Diffstat (limited to 'locale/setlocale.c')
-rw-r--r-- | locale/setlocale.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/locale/setlocale.c b/locale/setlocale.c index c1b8c3faec..767a5aab6b 100644 --- a/locale/setlocale.c +++ b/locale/setlocale.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1995-2000, 2002, 2003, 2004, 2006 +/* Copyright (C) 1991, 1992, 1995-2000, 2002, 2003, 2004, 2006, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -123,7 +123,7 @@ static void (*const _nl_category_postload[]) (void) = /* Lock for protecting global data. */ -__libc_lock_define_initialized (, __libc_setlocale_lock attribute_hidden) +__libc_rwlock_define_initialized (, __libc_setlocale_lock attribute_hidden) /* Defined in loadmsgcat.c. */ extern int _nl_msg_cat_cntr; @@ -314,7 +314,7 @@ setlocale (int category, const char *locale) } /* Protect global data. */ - __libc_lock_lock (__libc_setlocale_lock); + __libc_rwlock_wrlock (__libc_setlocale_lock); /* Load the new data for each category. */ while (category-- > 0) @@ -381,7 +381,7 @@ setlocale (int category, const char *locale) free ((char *) newnames[category]); /* Critical section left. */ - __libc_lock_unlock (__libc_setlocale_lock); + __libc_rwlock_unlock (__libc_setlocale_lock); /* Free the resources (the locale path variable). */ free (locale_path); @@ -394,7 +394,7 @@ setlocale (int category, const char *locale) const char *newname[1] = { locale }; /* Protect global data. */ - __libc_lock_lock (__libc_setlocale_lock); + __libc_rwlock_wrlock (__libc_setlocale_lock); if (CATEGORY_USED (category)) { @@ -446,7 +446,7 @@ setlocale (int category, const char *locale) } /* Critical section left. */ - __libc_lock_unlock (__libc_setlocale_lock); + __libc_rwlock_unlock (__libc_setlocale_lock); /* Free the resources (the locale path variable. */ free (locale_path); |