Use different syscall constants on Android
Review URL: http://codereview.chromium.org/6716021 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
b69591bc0f
commit
118c5651c8
@ -812,7 +812,11 @@ enum ArmRegisters {R15 = 15, R13 = 13, R11 = 11};
|
|||||||
|
|
||||||
static int GetThreadID() {
|
static int GetThreadID() {
|
||||||
// Glibc doesn't provide a wrapper for gettid(2).
|
// Glibc doesn't provide a wrapper for gettid(2).
|
||||||
|
#if defined(ANDROID)
|
||||||
|
return syscall(__NR_gettid);
|
||||||
|
#else
|
||||||
return syscall(SYS_gettid);
|
return syscall(SYS_gettid);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -979,7 +983,11 @@ class SignalSender : public Thread {
|
|||||||
void SendProfilingSignal(int tid) {
|
void SendProfilingSignal(int tid) {
|
||||||
if (!signal_handler_installed_) return;
|
if (!signal_handler_installed_) return;
|
||||||
// Glibc doesn't provide a wrapper for tgkill(2).
|
// Glibc doesn't provide a wrapper for tgkill(2).
|
||||||
|
#if defined(ANDROID)
|
||||||
|
syscall(__NR_tgkill, vm_tgid_, tid, SIGPROF);
|
||||||
|
#else
|
||||||
syscall(SYS_tgkill, vm_tgid_, tid, SIGPROF);
|
syscall(SYS_tgkill, vm_tgid_, tid, SIGPROF);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sleep(SleepInterval full_or_half) {
|
void Sleep(SleepInterval full_or_half) {
|
||||||
|
Loading…
Reference in New Issue
Block a user