[MPlayer-dev-eng] [PATCH] use pthreads for cache on cygwin
Diego Biurrun
diego at biurrun.de
Fri Nov 28 17:04:03 CET 2008
On Sat, Nov 15, 2008 at 11:24:35PM +0100, Reimar Döffinger wrote:
> On Sat, Nov 15, 2008 at 09:34:56PM +0100, Diego Biurrun wrote:
> > On Fri, Nov 14, 2008 at 08:27:55PM +0100, Reimar Döffinger wrote:
> > > the "native" thread API for cygwin is pthreads, the threading API we
> > > currently use for MinGW is not available for it (my fault for not
> > > checking), and the one we used before to the best of my knowledge would
> > > have memleaks on cygwin, too.
> > > Thus I propose attached patch which uses pthread_create etc.
> > > It depends on the PTHREAD_CACHE define so it will be easy to activate on
> > > other systems, too (I tested it on Linux, someone on -users tested it
> > > for cygwin), but for now will only be used on Cygwin.
> > > Any objections to it?
> > >
> > > --- stream/cache2.c (revision 27905)
> > > +++ stream/cache2.c (working copy)
> > > @@ -16,15 +16,22 @@
> > >
> > > +#ifdef __CYGWIN__
> > > +#define PTHREAD_CACHE 1
> > > +#endif
> >
> > This should be in configure.
>
> I know, I just was not sure about the best logic.
> I still don't have Cygwin to test myself, but attached patch would
> probably work.
> I don't like it much though because it leaves the cache checks a bit spread all
> over the place.
It's better than what we have now, so commit it.
Diego
More information about the MPlayer-dev-eng
mailing list