This is the mail archive of the libc-alpha@sources.redhat.com 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: [libc-alpha] Re: horrible disk thorughput on itanium


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


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