From 91e32540c463bc9a1158ce8fe668179f84c77226 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 11 Apr 2008 08:20:04 +0000 Subject: [BZ #5443] 2008-04-11 Jakub Jelinek [BZ #5443] * time/era.c: Transform __libc_setlocale_lock into rwlock. * time/alt_digit.c: Likewise. * wcsmbs/wcsmbsload.c: Likewise. --- time/era.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'time/era.c') diff --git a/time/era.c b/time/era.c index a8d2237..a6f4a4c 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 /* 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 * -- cgit v1.1