This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [libc-alpha] Re: horrible disk thorughput on itanium
- From: Thorsten Kukuk <kukuk at suse dot de>
- To: Kaz Kylheku <kaz at ashi dot footprints dot net>
- Cc: Linus Torvalds <torvalds at transmeta dot com>,libc-alpha at sources dot redhat dot com
- Date: Sat, 8 Dec 2001 08:42:00 +0100
- Subject: Re: [libc-alpha] Re: horrible disk thorughput on itanium
- Organization: SuSE GmbH, Nuernberg, Germany
- References: <u8k7vylu72.fsf@gromit.moeb> <Pine.LNX.4.33.0112072137470.2640-100000@ashi.FootPrints.net>
On Fri, Dec 07, Kaz Kylheku wrote:
> In a single-threaded application, compiled without _REENTRANT, can't
> putc() just be a *macro* in the header file that calls putc_unlocked()?
> This solves the problem for newly recompiled code.
>
> #ifdef __USE_REENTRANT
> #define putc(_ch, _fp) _IO_putc(_ch, _fp)
> #else
> #define putc(_ch, _fp) _IO_putc_unlocked(_ch, _fp)
> #endif
>
> This could be done in addition to the fix you suggest, which helps
> already compiled libc clients. Same for getc.
>
> Or am I too wasted to see some obvious or not-so-obvious problem?
The problems will be third party libraries. If they compile them
without _REENTRANT, they are not useful for multithreaded applications.
If they compile them with _REENTRANT, they are again slow in single
thread application ...
--
Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de
SuSE GmbH Deutschherrenstr. 15-19 D-90429 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B