summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 17:59:41 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 17:59:41 +0000
commit58d0dcc23d3d908d2d61f0dbbf4bef3de7da706b (patch)
tree34e76bf6f0bcf8496d87570e2e2342e6a6237dc3 /base
parent130eeb3f689593d7ab1601b867124b1fba176f0f (diff)
downloadchromium_src-58d0dcc23d3d908d2d61f0dbbf4bef3de7da706b.zip
chromium_src-58d0dcc23d3d908d2d61f0dbbf4bef3de7da706b.tar.gz
chromium_src-58d0dcc23d3d908d2d61f0dbbf4bef3de7da706b.tar.bz2
NaCl bringup of base.
We need to include nacl_syscalls.h for nanosleep. Original patch by Eric Seidel. Review URL: http://codereview.chromium.org/4812003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65960 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/platform_thread_posix.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/base/platform_thread_posix.cc b/base/platform_thread_posix.cc
index 040452e..66f3928 100644
--- a/base/platform_thread_posix.cc
+++ b/base/platform_thread_posix.cc
@@ -4,7 +4,6 @@
#include "base/platform_thread.h"
-#include <dlfcn.h>
#include <errno.h>
#include <sched.h>
@@ -15,11 +14,16 @@
#endif
#if defined(OS_LINUX)
+#include <dlfcn.h>
#include <sys/prctl.h>
#include <sys/syscall.h>
#include <unistd.h>
#endif
+#if defined(OS_NACL)
+#include <sys/nacl_syscalls.h>
+#endif
+
#include "base/logging.h"
#include "base/safe_strerror_posix.h"
@@ -47,6 +51,8 @@ PlatformThreadId PlatformThread::CurrentId() {
#elif defined(OS_FREEBSD)
// TODO(BSD): find a better thread ID
return reinterpret_cast<int64>(pthread_self());
+#elif defined(OS_NACL)
+ return pthread_self();
#endif
}