-#if defined( PTH_INIT_IN_PTH_H )
- p_this->thread_id = pth_spawn( PTH_ATTR_DEFAULT, func, p_data );
- i_ret = p_this->thread_id == NULL;
-
-#elif defined( ST_INIT_IN_ST_H )
- p_this->thread_id = st_thread_create( func, p_data, 1, 0 );
- i_ret = 0;
-
-#elif defined( WIN32 ) || defined( UNDER_CE )
- {
- unsigned threadID;
- /* When using the MSVCRT C library you have to use the _beginthreadex
- * function instead of CreateThread, otherwise you'll end up with
- * memory leaks and the signal functions not working (see Microsoft
- * Knowledge Base, article 104641) */
- p_this->thread_id =
-#if defined( UNDER_CE )
- (HANDLE)CreateThread( NULL, 0, (PTHREAD_START) func,
- p_data, 0, &threadID );
-#else
- (HANDLE)_beginthreadex( NULL, 0, (PTHREAD_START) func,
- p_data, 0, &threadID );
-#endif
- }
-
- if ( p_this->thread_id && i_priority )
- {
- if ( !SetThreadPriority(p_this->thread_id, i_priority) )
- {
- msg_Warn( p_this, "couldn't set a faster priority" );
- i_priority = 0;
- }
- }
-
- i_ret = ( p_this->thread_id ? 0 : 1 );
-
-#elif defined( HAVE_KERNEL_SCHEDULER_H )
- p_this->thread_id = spawn_thread( (thread_func)func, psz_name,
- i_priority, p_data );
- i_ret = resume_thread( p_this->thread_id );
-
-#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
- i_ret = pthread_create( &p_this->thread_id, NULL, func, p_data );