summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2015-07-07 04:15:43 +0000
committerJason Molenda <jmolenda@apple.com>2015-07-07 04:15:43 +0000
commit3f661e0899f6d829846163b9e6f557c247e008dc (patch)
tree039e672af7fb10703978f0f3432233a70c06aaa9
parent7c754ea264e24243a92c60643d4ec56de3e2327e (diff)
downloadbcm5719-llvm-3f661e0899f6d829846163b9e6f557c247e008dc.tar.gz
bcm5719-llvm-3f661e0899f6d829846163b9e6f557c247e008dc.zip
When debugserver is running on an iOS device, call
proc_set_wakemon_params() to raise the limit on the # of wakeups per second that are acceptable before the system may send an EXC_RESOURCE signal to debugserver. <rdar://problem/19631512> llvm-svn: 241553
-rw-r--r--lldb/tools/debugserver/source/debugserver.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/tools/debugserver/source/debugserver.cpp b/lldb/tools/debugserver/source/debugserver.cpp
index 2f8c3dce117..afd5b0029e0 100644
--- a/lldb/tools/debugserver/source/debugserver.cpp
+++ b/lldb/tools/debugserver/source/debugserver.cpp
@@ -27,6 +27,7 @@
#if defined (__APPLE__)
#include <sched.h>
+extern "C" int proc_set_wakemon_params(pid_t, int, int); // <libproc_internal.h> SPI
#endif
#include "CFString.h"
@@ -891,6 +892,8 @@ main (int argc, char *argv[])
thread_param.sched_priority = 47;
pthread_setschedparam(pthread_self(), thread_sched_policy, &thread_param);
}
+
+ ::proc_set_wakemon_params (getpid(), 500, 0); // Allow up to 500 wakeups/sec to avoid EXC_RESOURCE for normal use.
#endif
#endif
OpenPOWER on IntegriCloud