#endif
}
+#ifndef LIBVLC_USE_PTHREAD
+enum {
+ VLC_SAVE_CANCEL,
+ VLC_RESTORE_CANCEL,
+ VLC_TEST_CANCEL,
+};
+#endif
+
+VLC_EXPORT (void, vlc_control_cancel, (int cmd, ...));
+
/**
* Save the cancellation state and disable cancellation for the calling thread.
* This function must be called before entering a piece of code that is not
{
#if defined (LIBVLC_USE_PTHREAD)
(void) pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, p_state);
+#else
+ vlc_control_cancel (VLC_SAVE_CANCEL, p_state);
#endif
}
{
#if defined (LIBVLC_USE_PTHREAD)
(void) pthread_setcancelstate (state, NULL);
+#else
+ vlc_control_cancel (VLC_RESTORE_CANCEL, state);
#endif
}
{
#if defined (LIBVLC_USE_PTHREAD)
pthread_testcancel ();
+#else
+ vlc_control_cancel (VLC_TEST_CANCEL);
#endif
}