Index: src/base/platform/platform-posix.cc |
diff --git a/src/base/platform/platform-posix.cc b/src/base/platform/platform-posix.cc |
index bb340ab5f95af47f8c455e91ceeb1c182c8d7434..682c44848f4da22c7cd21e318521c4ca5c04239c 100644 |
--- a/src/base/platform/platform-posix.cc |
+++ b/src/base/platform/platform-posix.cc |
@@ -55,7 +55,7 @@ |
#include <sys/prctl.h> // NOLINT, for prctl |
#endif |
-#if !defined(V8_OS_NACL) && !defined(_AIX) |
+#ifndef _AIX |
#include <sys/syscall.h> |
#endif |
@@ -113,10 +113,6 @@ void OS::ProtectCode(void* address, const size_t size) { |
#if V8_OS_CYGWIN |
DWORD old_protect; |
VirtualProtect(address, size, PAGE_EXECUTE_READ, &old_protect); |
-#elif V8_OS_NACL |
- // The Native Client port of V8 uses an interpreter, so |
- // code pages don't need PROT_EXEC. |
- mprotect(address, size, PROT_READ); |
#else |
mprotect(address, size, PROT_READ | PROT_EXEC); |
#endif |
@@ -154,12 +150,6 @@ const char* OS::GetGCFakeMMapFile() { |
void* OS::GetRandomMmapAddr() { |
-#if V8_OS_NACL |
- // TODO(bradchen): restore randomization once Native Client gets |
- // smarter about using mmap address hints. |
- // See http://code.google.com/p/nativeclient/issues/3341 |
- return NULL; |
-#endif |
#if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \ |
defined(THREAD_SANITIZER) |
// Dynamic tools do not support custom mmap addresses. |
@@ -256,11 +246,7 @@ void OS::DebugBreak() { |
#elif V8_HOST_ARCH_PPC |
asm("twge 2,2"); |
#elif V8_HOST_ARCH_IA32 |
-#if V8_OS_NACL |
- asm("hlt"); |
-#else |
asm("int $3"); |
-#endif // V8_OS_NACL |
#elif V8_HOST_ARCH_X64 |
asm("int $3"); |
#elif V8_HOST_ARCH_S390 |
@@ -358,17 +344,12 @@ int OS::GetCurrentThreadId() { |
// |
int OS::GetUserTime(uint32_t* secs, uint32_t* usecs) { |
-#if V8_OS_NACL |
- // Optionally used in Logger::ResourceEvent. |
- return -1; |
-#else |
struct rusage usage; |
if (getrusage(RUSAGE_SELF, &usage) < 0) return -1; |
*secs = static_cast<uint32_t>(usage.ru_utime.tv_sec); |
*usecs = static_cast<uint32_t>(usage.ru_utime.tv_usec); |
return 0; |
-#endif |
} |
@@ -614,8 +595,6 @@ void Thread::Start() { |
memset(&attr, 0, sizeof(attr)); |
result = pthread_attr_init(&attr); |
DCHECK_EQ(0, result); |
- // Native client uses default stack size. |
-#if !V8_OS_NACL |
size_t stack_size = stack_size_; |
#if V8_OS_AIX |
if (stack_size == 0) { |
@@ -627,7 +606,6 @@ void Thread::Start() { |
result = pthread_attr_setstacksize(&attr, stack_size); |
DCHECK_EQ(0, result); |
} |
-#endif |
{ |
LockGuard<Mutex> lock_guard(&data_->thread_creation_mutex_); |
result = pthread_create(&data_->thread_, &attr, ThreadEntry, this); |