[vlc-devel] vlc: svn commit r22460 (damienf)

Gildas Bazin gbazin at altern.org
Thu Oct 11 00:20:55 CEST 2007


On Mon, 2007-10-08 at 21:20 +0100, Damien Fouilleul wrote:
> Rémi Denis-Courmont wrote:
> > Le Monday 08 October 2007 23:10:41 Damien Fouilleul, vous avez écrit :
> >   
> >> yes, i agree, i dunno really why these were in headers in the first
> >> place, but i felt lazy and i only really put the minimum effort into
> >> that one, but by implementing this function i got a bit dazzled about
> >> the state of the existing thread code for win32, sounds awfully
> >> complicated for what it does, it sounds to me that it does more than it
> >> should. when I have time I'll review that code properly and take it out
> >> the headers all together.
> >>
> >> actually, i'm thinking off taking it out altogether and wrap the
> >> existing calls to pthread-win32 instead
> >>
> >> anyone has a strong opinion on this ?
> >>     
> >
> > I already suggested this over a year ago.
> >
> > But at the time, Gibalou was THE VLC win32 guy, and he thought that 
> > pthread-win32 had bad performance footprint. Figure - either of you would 
> > know better than me anyway.
> >
> >   
> well, i think he was right back then, in order to be compliant, 
> pthreads-win32 needs to do more work that what the VLC wrapper code is 
> doing, but I'm not really sure if this really matters on nowadays CPUs. 
> it probably did on a pentium III.
> 

The complexity in the current win32 threading code is all due to the
win9x support which is difficult to get right due to the lack of a
proper thread synchronisation API. Now if you don't want to support
win9x and dump all that code that would make the whole thing really
small, simple and straight-forward (just look at src/misc/threads.c to
see what code is actually used on NT).
However, if you do that you will also loose the ability to run VLC under
the msvc debugger (and probably other debuggers) because of a known
interaction issue between the debugger and PulseEvent()
(http://support.microsoft.com/kb/q173260/).

Now personally I would be tempted to say that if the current code works
then you shouldn't really have any reason to change it... on the other
hand I'm not the one who's supporting this software anymore so it really
is up to you.

--
Gildas




More information about the vlc-devel mailing list