[vlc-devel] commit: vlc_testcancel: explicit cancellation point ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Aug 27 22:57:27 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Jul  6 21:14:32 2008 +0300| [fb157491d9f019e6233db06886a74fbbd2ea9573] | committer: Rémi Denis-Courmont 

vlc_testcancel: explicit cancellation point

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fb157491d9f019e6233db06886a74fbbd2ea9573
---

 include/vlc_threads.h |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index 0f25dac..9610793 100644
--- a/include/vlc_threads.h
+++ b/include/vlc_threads.h
@@ -615,6 +615,18 @@ static inline void vlc_restorecancel (int state)
 #endif
 }
 
+/**
+ * Issues an explicit deferred cancellation point.
+ * This has no effect if thread cancellation is disabled.
+ * This can be called when there is a rather slow non-sleeping operation.
+ */
+static inline void vlc_testcancel (void)
+{
+#if defined (LIBVLC_USE_PTHREAD)
+    pthread_testcancel ();
+#endif
+}
+
 /*****************************************************************************
  * vlc_thread_create: create a thread
  *****************************************************************************/




More information about the vlc-devel mailing list