Changeset 10ac32d604db8cd7dadc6f44265d89d8a0a00a66
- 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
| rc53bb18 |
r10ac32d |
|
| 125 | 125 | static vlc_object_t *p_helper = NULL; |
|---|
| 126 | 126 | static unsigned long hIPCHelper; |
|---|
| | 127 | static HANDLE hIPCHelperReady; |
|---|
| 127 | 128 | |
|---|
| 128 | 129 | typedef struct |
|---|
| … | … | |
| 178 | 179 | vlc_custom_create( p_this, sizeof(vlc_object_t), |
|---|
| 179 | 180 | VLC_OBJECT_GENERIC, typename ); |
|---|
| 180 | | vlc_object_lock( p_helper ); |
|---|
| 181 | 181 | |
|---|
| 182 | 182 | /* Run the helper thread */ |
|---|
| | 183 | hIPCHelperReady = CreateEvent( NULL, FALSE, FALSE, NULL ); |
|---|
| 183 | 184 | hIPCHelper = _beginthreadex( NULL, 0, IPCHelperThread, p_helper, |
|---|
| 184 | 185 | 0, NULL ); |
|---|
| 185 | 186 | if( hIPCHelper ) |
|---|
| 186 | | vlc_object_wait( p_helper ); |
|---|
| 187 | | vlc_object_unlock( p_helper ); |
|---|
| 188 | | |
|---|
| 189 | | if( !hIPCHelper ) |
|---|
| | 187 | WaitForSingleObject( hIPCHelperReady, INFINITE ); |
|---|
| | 188 | else |
|---|
| 190 | 189 | { |
|---|
| 191 | 190 | msg_Err( p_this, "one instance mode DISABLED " |
|---|
| … | … | |
| 195 | 194 | } |
|---|
| 196 | 195 | vlc_object_attach (p_helper, p_this); |
|---|
| | 196 | CloseHandle( hIPCHelperReady ); |
|---|
| 197 | 197 | |
|---|
| 198 | 198 | /* Initialization done. |
|---|
| … | … | |
| 293 | 293 | |
|---|
| 294 | 294 | /* Signal the creation of the thread and events queue */ |
|---|
| 295 | | vlc_object_signal( p_this ); |
|---|
| | 295 | SetEvent( hIPCHelperReady ); |
|---|
| 296 | 296 | |
|---|
| 297 | 297 | while( GetMessage( &message, NULL, 0, 0 ) ) |
|---|