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

Issue 4812002: Bring up IPC in NaCl.... (Closed)

Created:
10 years, 1 month ago by abarth-chromium
Modified:
9 years, 7 months ago
Reviewers:
brettw
CC:
chromium-reviews, brettw-cc_chromium.org, darin (slow to review), eseidel, Brad Chen
Visibility:
Public.

Description

Bring up IPC in NaCl. This patch gets a bunch of the IPC and Base libraries compiling (but not linking) in NaCl. There's obviously a bunch more work to do, but this patch is a starting point. Original patch by Eric Seidel. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=65920

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -2 lines) Patch
M base/command_line.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/logging.cc View 3 chunks +11 lines, -0 lines 0 comments Download
M build/build_config.h View 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
abarth-chromium
By way of background, I spoke with Brett today and he said that bringing up ...
10 years, 1 month ago (2010-11-12 07:49:07 UTC) #1
brettw
10 years, 1 month ago (2010-11-12 07:53:46 UTC) #2
LGTM

On Thu, Nov 11, 2010 at 11:49 PM,  <abarth@chromium.org> wrote:
> Reviewers: brettw,
>
> Message:
> By way of background, I spoke with Brett today and he said that bringing up
> the
> IPC library in NaCl would be helpful.  Eric and I are giving it a go.
>  Here's an
> early patch to see if we're on the right track.
>
> Thoughts on the approach?
>
> Thanks,
> Adam
>
>
> Description:
> Bring up IPC in NaCl.
>
> This patch gets a bunch of the IPC and Base libraries compiling (but not
> linking) in NaCl.  There's obviously a bunch more work to do, but this patch
> is
> a starting point.
>
> Original patch by Eric Seidel.
>
>
> Please review this at http://codereview.chromium.org/4812002/
>
> SVN Base: svn://svn.chromium.org/chrome/trunk/src/
>
> Affected files:
>  M     base/command_line.cc
>  M     base/logging.cc
>  M     build/build_config.h
>
>
> Index: base/command_line.cc
> ===================================================================
> --- base/command_line.cc        (revision 65551)
> +++ base/command_line.cc        (working copy)
> @@ -224,7 +224,7 @@
>  #endif
>  }
>
> -#if defined(OS_POSIX) && !defined(OS_MACOSX)
> +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_NACL)
>  // static
>  void CommandLine::SetProcTitle() {
>   // Build a single string which consists of all the arguments separated
> 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);
> Index: build/build_config.h
> ===================================================================
> --- build/build_config.h        (revision 65551)
> +++ build/build_config.h        (working copy)
> @@ -17,6 +17,8 @@
>  // A set of macros to use for platform detection.
>  #if defined(__APPLE__)
>  #define OS_MACOSX 1
> +#elif defined(__native_client__)
> +#define OS_NACL 1
>  #elif defined(__linux__)
>  #define OS_LINUX 1
>  // Use TOOLKIT_GTK on linux if TOOLKIT_VIEWS isn't defined.
> @@ -60,7 +62,7 @@
>  // For access to standard POSIXish features, use OS_POSIX instead of a
>  // more specific macro.
>  #if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD) || \
> -    defined(OS_OPENBSD) || defined(OS_SOLARIS)
> +    defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(OS_NACL)
>  #define OS_POSIX 1
>  // Use base::DataPack for name/value pairs.
>  #define USE_BASE_DATA_PACK 1
>
>
>

Powered by Google App Engine
This is Rietveld 408576698