Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2097)

Unified Diff: base/logging.cc

Issue 4812002: Bring up IPC in NaCl.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/command_line.cc ('k') | build/build_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging.cc
===================================================================
--- base/logging.cc (revision 65551)
+++ base/logging.cc (working copy)
@@ -19,7 +19,12 @@
#include <mach/mach_time.h>
#include <mach-o/dyld.h>
#elif defined(OS_POSIX)
+#if defined(OS_NACL)
+#include <sys/nacl_syscalls.h>
+#include <sys/time.h> // timespec doesn't seem to be in <time.h>
+#else
#include <sys/syscall.h>
+#endif
#include <time.h>
#endif
@@ -128,6 +133,8 @@
#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
}
@@ -136,6 +143,10 @@
return GetTickCount();
#elif defined(OS_MACOSX)
return mach_absolute_time();
+#elif defined(OS_NACL)
+ // NaCl sadly does not have _POSIX_TIMERS enabled in sys/features.h
+ // So we have to use clock() for now.
+ return clock();
#elif defined(OS_POSIX)
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
« no previous file with comments | « base/command_line.cc ('k') | build/build_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698