summaryrefslogtreecommitdiff
path: root/libc/stdio/stdio_ext.cpp
diff options
context:
space:
mode:
authorJunjie Hu <junjie.hu@mediatek.com>2015-11-11 12:52:25 +0800
committerElliott Hughes <enh@google.com>2015-11-11 21:21:21 +0000
commitde1246202a229efe555170a7c5803510f5975658 (patch)
treee6d531e81a0546cc4cda65d6b99f71f49191ec9a /libc/stdio/stdio_ext.cpp
parent6209b99a7351ed732ab25bb2ffa75465366b244f (diff)
Fix potential race condition on CTS TC pthread_gettid_np
Root cause: If start_routine thread exits before pthread_gettid_np is invokded, the "tid" field will be cleared so that pthread_gettid_np will get "0" (which is cleared by kernel, due to the flag "CLONE_CHILD_CLEARTID" is set while calling clone system call inside pthread_create). Proposed patch: Use a mutex to guarantee pthread_gettid_np will be invoked and returned before the start_routine exits Signed-off-by: Junjie Hu <junjie.hu@mediatek.com> Change-Id: I22411f1b0f7446d76a0373cef4ccec858fac7018 (cherry picked from commit 4f8010293506d4e08d184e66bf4af44ef3483611)
Diffstat (limited to 'libc/stdio/stdio_ext.cpp')
0 files changed, 0 insertions, 0 deletions