This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Make fprintf() function to multithread-safe


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]