[MPlayer-dev-eng] [PATCH] use pthreads for caching

Rich Felker dalias at aerifal.cx
Sat Jan 27 16:08:16 CET 2007


On Sat, Jan 27, 2007 at 10:20:39AM +0100, A Mennucc wrote:
> there is no command pthread_initialize()
> to use threads, you just link the library in, and pthread_create() as needed

And pthread_create and similar calls in turn call an internal
"pthread_initialize" type function if it hasn't already been called.
If they don't, it means that the libc implementation is so bad that it
penalizes performance in _all_ programs (even ones that don't use
threads), which considering the badness of glibc is always a
possibility...

> > I suspect linking to and initializing
> >> theads when they're not needed could active nasty locking mechanisms
> >> in the C library (malloc, etc.) possibly causing performance loss.
> 
> this said, I do not know if pthread_create()  adds a nasty locking
> mechanism in malloc

Either it adds it, or it was already there to begin with..

Rich



More information about the MPlayer-dev-eng mailing list