MainLoop: work around an android libc bug
authorPavel Labath <labath@google.com>
Mon, 30 Oct 2017 16:00:13 +0000 (16:00 +0000)
committerPavel Labath <labath@google.com>
Mon, 30 Oct 2017 16:00:13 +0000 (16:00 +0000)
commit370331083496f9b8017eab44d1c67c9dd39fdfdd
tree00c26b0a6d8d9531056291abb536d9c93df4235a
parent05da5b0205aeada52a6838353d214db3723c79c7
MainLoop: work around an android libc bug

Versions of android before kitkat implemented pselect non-atomically,
which caused flakyness, as we were relying on it atomically setting the
signal mask to implement waiting for signals.

This patch implements a direct call to the the pselect kernel syscall,
which does not suffer from this problem. The code itself is not very
pretty, but fortunately the uglyness is contained in the
android version of the MainLoop::RunImpl::Poll function.

llvm-svn: 316915
lldb/include/lldb/Host/MainLoop.h
lldb/source/Host/common/MainLoop.cpp