summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/Transforms/Instrumentation/DebugIR.cpp
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2014-12-08 16:18:05 +0000
committerkib <kib@FreeBSD.org>2014-12-08 16:18:05 +0000
commit042604e2ce8f6158efea05cb62c32a8b8310060f (patch)
tree88eb4c9349a29f56d3b4d35c9bd49b83bf10bf30 /contrib/llvm/lib/Transforms/Instrumentation/DebugIR.cpp
parentefcd39f69106aa75014cbe681deae31729c4c517 (diff)
downloadFreeBSD-src-042604e2ce8f6158efea05cb62c32a8b8310060f.zip
FreeBSD-src-042604e2ce8f6158efea05cb62c32a8b8310060f.tar.gz
Thread waiting for the vfork(2)-ed child to exec or exit, must allow
for the suspension. Currently, the loop performs uninterruptible cv_wait(9) call, which prevents suspension until child allows further execution of parent. If child is stopped, suspension or single-threading is delayed indefinitely. Create a helper thread_suspend_check_needed() to identify the need for a call to thread_suspend_check(). It is required since call to the thread_suspend_check() cannot be safely done while owning the child (p2) process lock. Only when suspension is needed, drop p2 lock and call thread_suspend_check(). Perform wait for cv with timeout, in case suspend is requested after wait started; I do not see a better way to interrupt the wait. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
Diffstat (limited to 'contrib/llvm/lib/Transforms/Instrumentation/DebugIR.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud