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
This commit is contained in:
Jason Molenda 2015-07-07 04:15:43 +00:00
parent 7c754ea264
commit 3f661e0899
1 changed files with 3 additions and 0 deletions

View File

@ -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