Bug 914348 - Name the SamplerThread on linux. r=jld

This commit is contained in:
Benoit Girard 2013-09-11 13:57:43 -04:00
parent 3559f6e2bb
commit cf2aca467e

View File

@ -39,6 +39,7 @@
#include <sys/resource.h> #include <sys/resource.h>
#include <sys/syscall.h> #include <sys/syscall.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/prctl.h> // set name
#include <stdlib.h> #include <stdlib.h>
#include <sched.h> #include <sched.h>
#ifdef ANDROID #ifdef ANDROID
@ -241,6 +242,8 @@ Sampler::FreePlatformData(PlatformData* aData)
} }
static void* SignalSender(void* arg) { static void* SignalSender(void* arg) {
// Taken from platform_thread_posix.cc
prctl(PR_SET_NAME, "SamplerThread", 0, 0, 0);
# if defined(ANDROID) # if defined(ANDROID)
// pthread_atfork isn't available on Android. // pthread_atfork isn't available on Android.
void* initialize_atfork = NULL; void* initialize_atfork = NULL;