aboutsummaryrefslogtreecommitdiffstats
path: root/ffbuild/arch.mak
diff options
context:
space:
mode:
authorWan-Teh Chang <wtc-at-google.com@ffmpeg.org>2017-07-10 10:24:59 -0700
committerRonald S. Bultje <rsbultje@gmail.com>2017-07-11 21:27:35 -0400
commit15c41cb6adc4d6720d51c21f8baebebce923b213 (patch)
treec4f01438041b476d18d1210ba4b9b2ca4897db75 /ffbuild/arch.mak
parentc34ece57c7a6d0e7df4259be13956e06d2b7b47d (diff)
downloadffmpeg-15c41cb6adc4d6720d51c21f8baebebce923b213.tar.gz
pthread_frame: save the FF_DEBUG_THREADS option in PerThreadContext.
Add the debug_threads boolean field to PerThreadContext. For PerThreadContext *p, p->debug_threads records whether the FF_DEBUG_THREADS bit is set in p->avctx->debug, and p->debug_threads and p->avctx->debug are kept in sync. The debug_threads field is defined as an atomic_int to allow atomic read by another thread in ff_thread_await_progress(). This fixes the tsan warning that 2e664b9c1e73c80aab91070c1eb7676f04bdd12d attempted to fix: WARNING: ThreadSanitizer: data race (pid=452658) Write of size 4 at 0x7b640003f4fc by main thread (mutexes: write M248499): #0 update_context_from_user [..]/libavcodec/pthread_frame.c:335:19 (5ab42bb1a6f4b068d7863dabe9b2bacc+0xe73859) [..] Previous read of size 4 at 0x7b640003f4fc by thread T130 (mutexes: write M248502, write M248500): #0 ff_thread_await_progress [..]/libavcodec/pthread_frame.c:591:26 (5ab42bb1a6f4b068d7863dabe9b2bacc+0xe749a1) Signed-off-by: Wan-Teh Chang <wtc@google.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'ffbuild/arch.mak')
0 files changed, 0 insertions, 0 deletions