[x264-devel] commit: Make sigint handler variable volatile (Jason Garrett-Glaser )

git at videolan.org git at videolan.org
Sun Oct 10 23:47:33 CEST 2010


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Wed Sep 29 00:15:14 2010 -0700| [4cba08aaea9813f1bcb6654a8abb141732bb0510] | committer: Jason Garrett-Glaser 

Make sigint handler variable volatile
Didn't actually cause any problems, but is necessary because it can be modified by another thread (the signal call).

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=4cba08aaea9813f1bcb6654a8abb141732bb0510
---

 x264.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/x264.c b/x264.c
index 415181c..433d3dd 100644
--- a/x264.c
+++ b/x264.c
@@ -56,9 +56,9 @@
 #endif
 
 /* Ctrl-C handler */
-static int     b_ctrl_c = 0;
-static int     b_exit_on_ctrl_c = 0;
-static void    SigIntHandler( int a )
+static volatile int b_ctrl_c = 0;
+static int          b_exit_on_ctrl_c = 0;
+static void SigIntHandler( int a )
 {
     if( b_exit_on_ctrl_c )
         exit(0);



More information about the x264-devel mailing list