Changeset 10ac32d604db8cd7dadc6f44265d89d8a0a00a66

Show
Ignore:
Timestamp:
07/09/08 13:26:15 (3 months ago)
Author:
Rémi Denis-Courmont <rdenis@simphalempin.com>
git-committer:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1220786775 +0300
git-parent:

[82580b6fabbc12384d59cf8fa9513cd246e3c958]

git-author:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1220786775 +0300
Message:

Fix use of vlc_object_wait()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/misc/win32_specific.c

    rc53bb18 r10ac32d  
    125125static vlc_object_t *p_helper = NULL; 
    126126static unsigned long hIPCHelper; 
     127static HANDLE hIPCHelperReady; 
    127128 
    128129typedef struct 
     
    178179                vlc_custom_create( p_this, sizeof(vlc_object_t), 
    179180                                   VLC_OBJECT_GENERIC, typename ); 
    180             vlc_object_lock( p_helper ); 
    181181 
    182182            /* Run the helper thread */ 
     183            hIPCHelperReady = CreateEvent( NULL, FALSE, FALSE, NULL ); 
    183184            hIPCHelper = _beginthreadex( NULL, 0, IPCHelperThread, p_helper, 
    184185                                         0, NULL ); 
    185186            if( hIPCHelper ) 
    186                 vlc_object_wait( p_helper ); 
    187             vlc_object_unlock( p_helper ); 
    188  
    189             if( !hIPCHelper ) 
     187                WaitForSingleObject( hIPCHelperReady, INFINITE ); 
     188            else 
    190189            { 
    191190                msg_Err( p_this, "one instance mode DISABLED " 
     
    195194            } 
    196195            vlc_object_attach (p_helper, p_this); 
     196            CloseHandle( hIPCHelperReady ); 
    197197 
    198198            /* Initialization done. 
     
    293293 
    294294    /* Signal the creation of the thread and events queue */ 
    295     vlc_object_signal( p_this ); 
     295    SetEvent( hIPCHelperReady ); 
    296296 
    297297    while( GetMessage( &message, NULL, 0, 0 ) )