Commit ca53307d authored by KO Myung-Hun's avatar KO Myung-Hun Committed by Rémi Denis-Courmont

Fix the problem that mwait() and msleep() do not work in a main thread and an alien thread

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent a80eae66
...@@ -72,8 +72,13 @@ static ULONG vlc_DosWaitEventSemEx( HEV hev, ULONG ulTimeout, BOOL fCancelable ) ...@@ -72,8 +72,13 @@ static ULONG vlc_DosWaitEventSemEx( HEV hev, ULONG ulTimeout, BOOL fCancelable )
struct vlc_thread *th = vlc_threadvar_get( thread_key ); struct vlc_thread *th = vlc_threadvar_get( thread_key );
if( th == NULL || !fCancelable ) if( th == NULL || !fCancelable )
{ {
/* Main thread - cannot be cancelled anyway */ /* Main thread - cannot be cancelled anyway
return DosWaitEventSem( hev, ulTimeout ); * Alien thread - out of our control
*/
if( hev != NULLHANDLE )
return DosWaitEventSem( hev, ulTimeout );
return DosSleep( ulTimeout );
} }
n = 0; n = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment