if( _b_autoloop )
ppsz_argv[ppsz_argc++] = "--loop";
- if( IsDebuggerPresent() )
- {
- /*
- ** VLC default threading mechanism is designed to be as compatible
- ** with POSIX as possible. However when debugged on win32, threads
- ** lose signals and eventually VLC get stuck during initialization.
- ** threading support can be configured to be more debugging friendly
- ** but it will be less compatible with POSIX.
- ** This is done by initializing with the following options:
- */
- ppsz_argv[ppsz_argc++] = "--fast-mutex";
- ppsz_argv[ppsz_argc++] = "--win9x-cv-method=1";
- }
-
_p_libvlc = libvlc_new(ppsz_argc, ppsz_argv, NULL);
if( NULL == _p_libvlc )
{
RegCloseKey( h_key );
}
ppsz_argv[ppsz_argc++] = "--no-one-instance";
- if( IsDebuggerPresent() )
- {
- /*
- ** VLC default threading mechanism is designed to be as compatible
- ** with POSIX as possible. However when debugged on win32, threads
- ** lose signals and eventually VLC get stuck during initialization.
- ** threading support can be configured to be more debugging friendly
- ** but it will be less compatible with POSIX.
- ** This is done by initializing with the following options:
- */
- ppsz_argv[ppsz_argc++] = "--fast-mutex";
- ppsz_argv[ppsz_argc++] = "--win9x-cv-method=1";
- }
-
#if 0
ppsz_argv[0] = "C:\\Cygwin\\home\\damienf\\vlc-trunk\\vlc";
#elif defined( ST_INIT_IN_ST_H )
#elif defined( UNDER_CE )
#elif defined( WIN32 )
- b_fast_mutex = config_GetInt( p_this, "fast-mutex" );
- i_win9x_cv = config_GetInt( p_this, "win9x-cv-method" );
+ if( IsDebuggerPresent() )
+ {
+ /* SignalObjectAndWait() API is problematic under a debugger */
+ b_fast_mutex = VLC_TRUE;
+ i_win9x_cv = 0;
+ }
+ else
+ {
+ b_fast_mutex = VLC_FALSE;
+ i_win9x_cv = 1;
+ }
#elif defined( HAVE_KERNEL_SCHEDULER_H )
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
pthread_mutex_lock( &once_mutex );
*****************************************************************************/
int __vlc_threadvar_create( vlc_object_t *p_this, vlc_threadvar_t *p_tls )
{
- int i_ret;
+ int i_ret = -1;
(void)p_this;
#if defined( PTH_INIT_IN_PTH_H )
i_ret = pth_key_create( &p_tls->handle, NULL );