about summary refs log tree commit diff
path: root/time/era.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-04-11 08:20:04 +0000
committerUlrich Drepper <drepper@redhat.com>2008-04-11 08:20:04 +0000
commit91e32540c463bc9a1158ce8fe668179f84c77226 (patch)
tree15a87453c81dbf29e48315b8870fad8053283d46 /time/era.c
parent1db5b6f4f30f856c990fc8990c07b60bf4834930 (diff)
downloadglibc-91e32540c463bc9a1158ce8fe668179f84c77226.tar.gz
glibc-91e32540c463bc9a1158ce8fe668179f84c77226.tar.xz
glibc-91e32540c463bc9a1158ce8fe668179f84c77226.zip
[BZ #5443]
2008-04-11  Jakub Jelinek  <jakub@redhat.com>
	[BZ #5443]
	* time/era.c: Transform __libc_setlocale_lock into rwlock.
	* time/alt_digit.c: Likewise.
	* wcsmbs/wcsmbsload.c: Likewise.
Diffstat (limited to 'time/era.c')
-rw-r--r--time/era.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/time/era.c b/time/era.c
index a8d2237338..a6f4a4cb07 100644
--- a/time/era.c
+++ b/time/era.c
@@ -1,5 +1,5 @@
 /* Helper functions used by strftime/strptime to handle locale-specific "eras".
-   Copyright (C) 1995-2001,02 Free Software Foundation, Inc.
+   Copyright (C) 1995-2002, 2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@
 #include <string.h>
 
 /* Some of the functions here must not be used while setlocale is called.  */
-__libc_lock_define (extern, __libc_setlocale_lock attribute_hidden)
+__libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden)
 
 #define CURRENT(item)		(current->values[_NL_ITEM_INDEX (item)].string)
 #define CURRENT_WORD(item)	(current->values[_NL_ITEM_INDEX (item)].word)
@@ -45,7 +45,7 @@ _nl_init_era_entries (struct locale_data *current)
   if (CURRENT_WORD (_NL_TIME_ERA_NUM_ENTRIES) == 0)
     return;
 
-  __libc_lock_lock (__libc_setlocale_lock);
+  __libc_rwlock_wrlock (__libc_setlocale_lock);
 
   if (current->private.time == NULL)
     {
@@ -135,7 +135,7 @@ _nl_init_era_entries (struct locale_data *current)
     }
 
  out:
-  __libc_lock_unlock (__libc_setlocale_lock);
+  __libc_rwlock_unlock (__libc_setlocale_lock);
 }
 
 struct era_entry *