[x264-devel] [PATCH] This change modifies x264_threadpool_t->exit to be volatile, preventing a benign data race warning from clang's ThreadSanitizer.

Daniel Deptford ddeptford at google.com
Tue Dec 11 20:11:36 CET 2018


---
 common/threadpool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/threadpool.c b/common/threadpool.c
index 7f98f778..4d36105b 100644
--- a/common/threadpool.c
+++ b/common/threadpool.c
@@ -34,7 +34,7 @@ typedef struct
 
 struct x264_threadpool_t
 {
-    int            exit;
+    volatile int   exit;
     int            threads;
     x264_pthread_t *thread_handle;
     void           (*init_func)(void *);
-- 
2.20.0.rc2.403.gdbc3b29805-goog



More information about the x264-devel mailing list