Increase the gdb-remote packet timeout for the first packet we send
to the remote side (QStartNoAckMode) - it may take a little longer than normal to get a reply. In debugserver, hardcode the priority for several threads so they aren't de-prioritized when a user app is using system resources. Also, set the names of the threads. <rdar://problem/17509866> llvm-svn: 213828
This commit is contained in:
@@ -25,6 +25,10 @@
|
||||
#include <sys/types.h>
|
||||
#include <crt_externs.h> // for _NSGetEnviron()
|
||||
|
||||
#if defined (__APPLE__)
|
||||
#include <sched.h>
|
||||
#endif
|
||||
|
||||
#include "CFString.h"
|
||||
#include "DNB.h"
|
||||
#include "DNBLog.h"
|
||||
@@ -877,6 +881,19 @@ main (int argc, char *argv[])
|
||||
{
|
||||
const char *argv_sub_zero = argv[0]; // save a copy of argv[0] for error reporting post-launch
|
||||
|
||||
#if defined (__APPLE__)
|
||||
pthread_setname_np ("main thread");
|
||||
#if defined (__arm__) || defined (__arm64__) || defined (__aarch64__)
|
||||
struct sched_param thread_param;
|
||||
int thread_sched_policy;
|
||||
if (pthread_getschedparam(pthread_self(), &thread_sched_policy, &thread_param) == 0)
|
||||
{
|
||||
thread_param.sched_priority = 47;
|
||||
pthread_setschedparam(pthread_self(), thread_sched_policy, &thread_param);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
g_isatty = ::isatty (STDIN_FILENO);
|
||||
|
||||
// ::printf ("uid=%u euid=%u gid=%u egid=%u\n",
|
||||
|
||||
Reference in New Issue
Block a user