[vlc-commits] interrupt: fix race in test case

Rémi Denis-Courmont git at videolan.org
Mon Feb 8 19:37:20 CET 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Feb  8 20:31:13 2016 +0200| [f33d8151f5930c4a6b8505942b94fd23cc5f8a59] | committer: Rémi Denis-Courmont

interrupt: fix race in test case

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

 src/test/interrupt.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/test/interrupt.c b/src/test/interrupt.c
index 02d4841..d58b521 100644
--- a/src/test/interrupt.c
+++ b/src/test/interrupt.c
@@ -97,7 +97,10 @@ static void *test_thread_cancel(void *data)
 {
     vlc_interrupt_t *ctx = data;
 
+    int canc = vlc_savecancel();
     test_context_simple(ctx);
+    vlc_restorecancel(canc);
+
     /* Test context clearing on cancellation */
     vlc_interrupt_set(ctx);
     for (;;)



More information about the vlc-commits mailing list