[vlc-devel] [Patch] vlc_threads_funcs.h - vlc_cond_timedwait on windows

Andre Weber WeberAndre at gmx.de
Wed Jan 16 20:34:25 CET 2008


Hallo,

I have a dejavue? that I fixed this bug last year sometimes.. and now he is back? why? who?

ok what happens:

vlc_cond_timedwait  gives me on windows an error printout for each call where the timeout
occurs - the linux part of this function handles that case with an test if the result of the pthreads
function was ETIMEDOUT - such code is missing to the windows part so I added
a test  for "WAIT_TIMEOUT" - and return this also...



What I would suggest we shouldn't return any OS or API specific return code from this function
- just define our own VLC return values like

#define VLC_WAIT_FAILED                -1
#define VLC_OBJECT_SIGNALED       0
#define VLC_WAIT_TIMEDOUT          1


instead of returning WAIT_TIMEOUT or ETIMEDOUT  .. or any other OS Error codes...
(I didn't found any case the sourcetree where the return value is realy evaluated... most just test
for != 0 .. to see if the event gots signaled ...)


André

atmo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vlc_threads_funcs.diff
Type: text/x-diff
Size: 629 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080116/a9e8a7b5/attachment.diff>


More information about the vlc-devel mailing list