- vlc_dictionary_init (&named_mutexes.list, 0);
- vlc_mutex_init (&named_mutexes.lock);
-#ifndef LIBVLC_USE_PTHREAD_CANCEL
- vlc_threadvar_create( &cancel_key, free );
-#endif
- }
- i_initializations++;
-
-#if defined( LIBVLC_USE_PTHREAD )
- pthread_mutex_unlock( &once_mutex );
-#endif
-
- return VLC_SUCCESS;
-}
-
-/*****************************************************************************
- * vlc_threads_end: stop threads system
- *****************************************************************************
- * FIXME: This function is far from being threadsafe.
- *****************************************************************************/
-void vlc_threads_end( void )
-{
-#if defined( LIBVLC_USE_PTHREAD )
- pthread_mutex_lock( &once_mutex );
-#endif
-
- assert( i_initializations > 0 );
+ case DLL_PROCESS_ATTACH:
+ vlc_dictionary_init (&named_mutexes.list, 0);
+ vlc_mutex_init (&named_mutexes.lock);
+ vlc_threadvar_create (&cancel_key, free);
+ break;