[MPlayer-dev-eng] configure: cleanups + bugfix for MT

Arpi arpi at thot.banki.hu
Fri Oct 12 01:32:07 CEST 2001


Hi,

> cleanups applied to configure and Makefile
ok

> > > Bugfix for building MT version (it is in the enclosed patch):
> > > AFAIK for Linux, too, the CFLAG -D_THREAD_SAFE should be added (same
> > > thing as -D_REENTRANT  - check in /usr/include/feature.h).
> > what does it exactly mean? as mplayer is single thread program, it
> > should work, but it isn't really reentrant (uses lots of global vars)
> 
> Well... I don't have checked further but since there are
> pthread_create() and mplayer is linked against -lpthread, this
> -D_THREAD_SAFE should be used. (It was already there for *BSD so I did
> not look further)
> 
> When you use this flag, it redefines errno on a per-thread basis (among
> other things) and defines reentrant functions (blah_r).
> If you don't, all your threads will write in one global errno value (for
> instance).

hmm. then it's bad in viewpoint of speed.
pthread isn't really used, but required by win32 dll loader (and maybe used
by a few dll)

we shouldn't use reentrant versions as they are slower.
and we don't need them as we never call them twice.


A'rpi / Astral & ESP-team

--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu



More information about the MPlayer-dev-eng mailing list