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:
sgjesse@chromium.org 2011-03-22 14:11:08 +00:00
parent b69591bc0f
commit 118c5651c8

View File

@ -812,7 +812,11 @@ enum ArmRegisters {R15 = 15, R13 = 13, R11 = 11};
static int GetThreadID() {
// Glibc doesn't provide a wrapper for gettid(2).
#if defined(ANDROID)
return syscall(__NR_gettid);
#else
return syscall(SYS_gettid);
#endif
}
@ -979,7 +983,11 @@ class SignalSender : public Thread {
void SendProfilingSignal(int tid) {
if (!signal_handler_installed_) return;
// 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);
#endif
}
void Sleep(SleepInterval full_or_half) {