}
#ifdef UNDER_CE
-# warning FIXME
# define WaitForMultipleObjectsEx(a,b,c) WaitForMultipleObjects(a,b)
#endif
#if defined( LIBVLC_USE_PTHREAD )
i_ret = pthread_key_create( p_tls, destr );
-#elif defined( UNDER_CE )
- i_ret = ENOSYS;
#elif defined( WIN32 )
/* FIXME: remember/use the destr() callback and stop leaking whatever */
*p_tls = TlsAlloc();
{
#if defined( LIBVLC_USE_PTHREAD )
pthread_key_delete (*p_tls);
-#elif defined( UNDER_CE )
#elif defined( WIN32 )
TlsFree (*p_tls);
#else
if (hThread)
{
+#ifndef UNDER_CE
/* Thread closes the handle when exiting, duplicate it here
* to be on the safe side when joining. */
if (!DuplicateHandle (GetCurrentProcess (), hThread,
free (th);
return ENOMEM;
}
+#else
+ th->handle = hThread;
+#endif
ResumeThread (hThread);
if (priority)
FILETIME create_ft, exit_ft, kernel_ft, user_ft;
int64_t real_time, kernel_time, user_time;
+#ifndef UNDER_CE
if( ! DuplicateHandle(GetCurrentProcess(),
p_priv->thread_id->handle,
GetCurrentProcess(),
p_priv->b_thread = false;
return; /* We have a problem! */
}
+#else
+ hThread = p_priv->thread_id->handle;
+#endif
vlc_join( p_priv->thread_id, NULL );