This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Make fprintf() function to multithread-safe
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Peng Haitao <penght at cn dot fujitsu dot com>
- Cc: drepper at gmail dot com, libc-alpha at sourceware dot org
- Date: Wed, 20 Jun 2012 09:08:42 +0200
- Subject: Re: [PATCH] Make fprintf() function to multithread-safe
- References: <1340170889-3498-1-git-send-email-penght@cn.fujitsu.com>
Peng Haitao <penght@cn.fujitsu.com> writes:
> diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
> index d569034..18bc81e 100644
> --- a/stdio-common/vfprintf.c
> +++ b/stdio-common/vfprintf.c
> @@ -195,6 +195,8 @@ static CHAR_T *group_number (CHAR_T *, CHAR_T *, const char *, const char *)
> __THROW internal_function;
> #endif
>
> +__libc_rwlock_define (extern, lock_function)
> +__libc_rwlock_define (extern, lock_type)
A single lock should be enough.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."