Revision: 23459
Author: [email protected]
Date: Wed Aug 27 13:47:19 2014 UTC
Log: Some PNaCL compatibility fixes.
* Removed a few useless and non-standard #includes.
* Made OS::GetCurrentProcessId compile without syscall.
[email protected]
Review URL: https://codereview.chromium.org/508933002
https://code.google.com/p/v8/source/detail?r=23459
Modified:
/branches/bleeding_edge/src/base/platform/platform-posix.cc
/branches/bleeding_edge/src/heap/mark-compact-inl.h
=======================================
--- /branches/bleeding_edge/src/base/platform/platform-posix.cc Wed Aug 27
08:29:22 2014 UTC
+++ /branches/bleeding_edge/src/base/platform/platform-posix.cc Wed Aug 27
13:47:19 2014 UTC
@@ -6,7 +6,6 @@
// own, but contains the parts which are the same across the POSIX
platforms
// Linux, MacOS, FreeBSD, OpenBSD, NetBSD and QNX.
-#include <dlfcn.h>
#include <errno.h>
#include <limits.h>
#include <pthread.h>
@@ -20,10 +19,12 @@
#include <sys/mman.h>
#include <sys/resource.h>
#include <sys/stat.h>
+#if !defined(__pnacl__)
#include <sys/syscall.h>
+#endif
#include <sys/time.h>
#include <sys/types.h>
-#if defined(__linux__)
+#if defined(__linux__) && !defined(__pnacl__)
#include <sys/prctl.h> // NOLINT, for prctl
#endif
#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) |
| \
@@ -31,10 +32,6 @@
#include <sys/sysctl.h> // NOLINT, for sysctl
#endif
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <netinet/in.h>
-
#undef MAP_TYPE
#if defined(ANDROID) && !defined(V8_ANDROID_LOG_STDOUT)
@@ -55,6 +52,10 @@
#include "src/base/atomicops.h"
#endif
+#if V8_OS_MACOSX
+#include <dlfcn.h>
+#endif
+
namespace v8 {
namespace base {
@@ -252,9 +253,13 @@
int OS::GetCurrentThreadId() {
#if defined(ANDROID)
return static_cast<int>(syscall(__NR_gettid));
+#elif defined(SYS_gettid)
+ return static_cast<int>(syscall(SYS_gettid));
#else
- return static_cast<int>(syscall(SYS_gettid));
-#endif // defined(ANDROID)
+ // PNaCL doesn't have a way to get an integral thread ID, but it doesn't
+ // really matter, because we only need it in
PerfJitLogger::LogRecordedBuffer.
+ return 0;
+#endif
}
=======================================
--- /branches/bleeding_edge/src/heap/mark-compact-inl.h Thu Aug 21 14:50:18
2014 UTC
+++ /branches/bleeding_edge/src/heap/mark-compact-inl.h Wed Aug 27 13:47:19
2014 UTC
@@ -5,8 +5,6 @@
#ifndef V8_HEAP_MARK_COMPACT_INL_H_
#define V8_HEAP_MARK_COMPACT_INL_H_
-#include <memory.h>
-
#include "src/heap/mark-compact.h"
#include "src/isolate.h"
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.