[libc-alpha] Re: horrible disk thorughput on itanium
Thorsten Kukuk
kukuk@suse.de
Sat Dec 8 00:12:00 GMT 2001
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
More information about the Libc-alpha
mailing list