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. --- wcsmbs/wcsmbsload.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'wcsmbs') diff --git a/wcsmbs/wcsmbsload.c b/wcsmbs/wcsmbsload.c index e82b1ff..2b46131 100644 --- a/wcsmbs/wcsmbsload.c +++ b/wcsmbs/wcsmbsload.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2002,2004,2005 Free Software Foundation, Inc. +/* Copyright (C) 1998-2002,2004,2005,2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -145,7 +145,7 @@ __wcsmbs_getfct (const char *to, const char *from, size_t *nstepsp) /* 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) /* Load conversion functions for the currently selected locale. */ void @@ -153,7 +153,7 @@ internal_function __wcsmbs_load_conv (struct locale_data *new_category) { /* Acquire the lock. */ - __libc_lock_lock (__libc_setlocale_lock); + __libc_rwlock_wrlock (__libc_setlocale_lock); /* We should repeat the test since while we waited some other thread might have run this function. */ @@ -211,7 +211,7 @@ __wcsmbs_load_conv (struct locale_data *new_category) } } - __libc_lock_unlock (__libc_setlocale_lock); + __libc_rwlock_unlock (__libc_setlocale_lock); } -- cgit v1.1