diff options
author | Ulrich Drepper <drepper@redhat.com> | 2008-03-31 00:38:06 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2008-03-31 00:38:06 +0000 |
commit | 9a69db292ac1548647ec6126dfa98a5daa88d239 (patch) | |
tree | 506e479204919607cb93da74a3da9f197c67ded0 /locale/newlocale.c | |
parent | 2ecc7d93b88b5b9e8ef5833c541d2db1c4608799 (diff) | |
download | glibc-9a69db292ac1548647ec6126dfa98a5daa88d239.tar.gz glibc-9a69db292ac1548647ec6126dfa98a5daa88d239.tar.xz glibc-9a69db292ac1548647ec6126dfa98a5daa88d239.zip |
[BZ #5443]
2008-03-30 Ulrich Drepper <drepper@redhat.com> [BZ #5443] * intl/dcigettext.c (__dcigettext): Get reader lock for locale data before looking for translation. * locale/duplocale.c: Transform __libc_setlocale_lock into rwlock. * locale/freelocale.c: Likewise. * locale/newlocale.c: Likewise. * locale/setlocale.c: Likewise. Based partially on a patch by ryo@np.css.fujitsu.com.
Diffstat (limited to 'locale/newlocale.c')
-rw-r--r-- | locale/newlocale.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/locale/newlocale.c b/locale/newlocale.c index 0c31ba48ae..da142f2912 100644 --- a/locale/newlocale.c +++ b/locale/newlocale.c @@ -1,5 +1,5 @@ /* Return a reference to locale information record. - Copyright (C) 1996, 1997, 1999, 2000-2002, 2004, 2005, 2006 + Copyright (C) 1996, 1997, 1999, 2000-2002, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -30,7 +30,7 @@ /* Lock for protecting global data. */ -__libc_lock_define (extern , __libc_setlocale_lock attribute_hidden) +__libc_rwlock_define (extern , __libc_setlocale_lock attribute_hidden) /* Use this when we come along an error. */ @@ -162,7 +162,7 @@ __newlocale (int category_mask, const char *locale, __locale_t base) } /* Protect global data. */ - __libc_lock_lock (__libc_setlocale_lock); + __libc_rwlock_wrlock (__libc_setlocale_lock); /* Now process all categories we are interested in. */ names_len = 0; @@ -183,7 +183,7 @@ __newlocale (int category_mask, const char *locale, __locale_t base) _nl_remove_locale (cnt, result.__locales[cnt]); /* Critical section left. */ - __libc_lock_unlock (__libc_setlocale_lock); + __libc_rwlock_unlock (__libc_setlocale_lock); return NULL; } @@ -263,7 +263,7 @@ __newlocale (int category_mask, const char *locale, __locale_t base) } /* Critical section left. */ - __libc_lock_unlock (__libc_setlocale_lock); + __libc_rwlock_unlock (__libc_setlocale_lock); /* Update the special members. */ update: |