Commit e7b765a1 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Win32: inline vlc_cancel_self

parent 56de5bf2
...@@ -206,7 +206,6 @@ VLC_EXPORT( unsigned, vlc_timer_getoverrun, (vlc_timer_t) LIBVLC_USED ); ...@@ -206,7 +206,6 @@ VLC_EXPORT( unsigned, vlc_timer_getoverrun, (vlc_timer_t) LIBVLC_USED );
#ifndef LIBVLC_USE_PTHREAD_CANCEL #ifndef LIBVLC_USE_PTHREAD_CANCEL
enum { enum {
VLC_DO_CANCEL,
VLC_CLEANUP_PUSH, VLC_CLEANUP_PUSH,
VLC_CLEANUP_POP, VLC_CLEANUP_POP,
}; };
......
...@@ -636,8 +636,12 @@ void vlc_detach (vlc_thread_t handle) ...@@ -636,8 +636,12 @@ void vlc_detach (vlc_thread_t handle)
/* APC procedure for thread cancellation */ /* APC procedure for thread cancellation */
static void CALLBACK vlc_cancel_self (ULONG_PTR dummy) static void CALLBACK vlc_cancel_self (ULONG_PTR dummy)
{ {
vlc_cancel_t *nfo = vlc_threadvar_get (cancel_key);
if (likely(nfo != NULL))
nfo->killed = true;
(void)dummy; (void)dummy;
vlc_control_cancel (VLC_DO_CANCEL);
} }
void vlc_cancel (vlc_thread_t thread_id) void vlc_cancel (vlc_thread_t thread_id)
...@@ -705,10 +709,6 @@ void vlc_control_cancel (int cmd, ...) ...@@ -705,10 +709,6 @@ void vlc_control_cancel (int cmd, ...)
va_start (ap, cmd); va_start (ap, cmd);
switch (cmd) switch (cmd)
{ {
case VLC_DO_CANCEL:
nfo->killed = true;
break;
case VLC_CLEANUP_PUSH: case VLC_CLEANUP_PUSH:
{ {
/* cleaner is a pointer to the caller stack, no need to allocate /* cleaner is a pointer to the caller stack, no need to allocate
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment