diff options
author | mcgrathr@chromium.org <mcgrathr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-05 23:37:11 +0000 |
---|---|---|
committer | mcgrathr@chromium.org <mcgrathr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-05 23:37:11 +0000 |
commit | 18ff3c38542bdc3186b1a8512bdc9edef69acff0 (patch) | |
tree | 4d3cc517c9621f9702b4239a5f1a9dba7463577e | |
parent | ac2256248677c5ca7d1117c686ed7619747b1e3d (diff) | |
download | chromium_src-18ff3c38542bdc3186b1a8512bdc9edef69acff0.zip chromium_src-18ff3c38542bdc3186b1a8512bdc9edef69acff0.tar.gz chromium_src-18ff3c38542bdc3186b1a8512bdc9edef69acff0.tar.bz2 |
Use native_client/src/public/ for IMC headers
The preferred way to get the header files for NaCl's IMC layer has changed.
The NaClImcMsgIoVec and NaClImcMsgHdr structs now use the NaclAbi prefix.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3464
TEST=
R=dmichael@chromium.org, mseaborn@chromium.org
Review URL: https://chromiumcodereview.appspot.com/15793014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204359 0039d316-1c4b-4281-b951-d872f2087c98
8 files changed, 24 insertions, 19 deletions
diff --git a/ipc/DEPS b/ipc/DEPS new file mode 100644 index 0000000..eea2192 --- /dev/null +++ b/ipc/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + # For ipc_channel_nacl.cc: + "+native_client/src/public", +] diff --git a/ipc/ipc_channel_nacl.cc b/ipc/ipc_channel_nacl.cc index 805e906..6213d41 100644 --- a/ipc/ipc_channel_nacl.cc +++ b/ipc/ipc_channel_nacl.cc @@ -6,8 +6,6 @@ #include <errno.h> #include <stddef.h> -#include <sys/nacl_imc_api.h> -#include <sys/nacl_syscalls.h> #include <sys/types.h> #include <algorithm> @@ -21,6 +19,8 @@ #include "base/threading/simple_thread.h" #include "ipc/file_descriptor_set_posix.h" #include "ipc/ipc_logging.h" +#include "native_client/src/public/imc_syscalls.h" +#include "native_client/src/public/imc_types.h" namespace IPC { @@ -39,8 +39,10 @@ bool ReadDataOnReaderThread(int pipe, MessageContents* contents) { contents->data.resize(Channel::kReadBufferSize); contents->fds.resize(FileDescriptorSet::kMaxDescriptorsPerMessage); - NaClImcMsgIoVec iov = { &contents->data[0], contents->data.size() }; - NaClImcMsgHdr msg = { &iov, 1, &contents->fds[0], contents->fds.size() }; + NaClAbiNaClImcMsgIoVec iov = { &contents->data[0], contents->data.size() }; + NaClAbiNaClImcMsgHdr msg = { + &iov, 1, &contents->fds[0], contents->fds.size() + }; int bytes_read = imc_recvmsg(pipe, &msg, 0); @@ -264,8 +266,10 @@ bool Channel::ChannelImpl::ProcessOutgoingMessages() { DCHECK(num_fds <= FileDescriptorSet::kMaxDescriptorsPerMessage); msg->file_descriptor_set()->GetDescriptors(fds); - NaClImcMsgIoVec iov = { const_cast<void*>(msg->data()), msg->size() }; - NaClImcMsgHdr msgh = { &iov, 1, fds, num_fds }; + NaClAbiNaClImcMsgIoVec iov = { + const_cast<void*>(msg->data()), msg->size() + }; + NaClAbiNaClImcMsgHdr msgh = { &iov, 1, fds, num_fds }; ssize_t bytes_written = imc_sendmsg(pipe_, &msgh, 0); DCHECK(bytes_written); // The trusted side shouldn't return 0. diff --git a/ppapi/native_client/DEPS b/ppapi/native_client/DEPS index 853cbd4..dbcded9 100644 --- a/ppapi/native_client/DEPS +++ b/ppapi/native_client/DEPS @@ -1,5 +1,6 @@ include_rules = [ "+native_client/src/include", + "+native_client/src/public", "+native_client/src/shared/platform", # TODO(bradnelson): Eliminate these as they are actually incorrectly rooted diff --git a/ppapi/native_client/src/trusted/plugin/service_runtime.cc b/ppapi/native_client/src/trusted/plugin/service_runtime.cc index 6c44bc4..403a9c4 100644 --- a/ppapi/native_client/src/trusted/plugin/service_runtime.cc +++ b/ppapi/native_client/src/trusted/plugin/service_runtime.cc @@ -40,6 +40,7 @@ #ifdef PostMessage #undef PostMessage #endif +#include "native_client/src/public/imc_types.h" #include "native_client/src/trusted/plugin/plugin.h" #include "native_client/src/trusted/plugin/plugin_error.h" #include "native_client/src/trusted/plugin/pnacl_coordinator.h" @@ -47,7 +48,6 @@ #include "native_client/src/trusted/plugin/sel_ldr_launcher_chrome.h" #include "native_client/src/trusted/plugin/srpc_client.h" #include "native_client/src/trusted/service_runtime/nacl_error_code.h" -#include "native_client/src/trusted/service_runtime/include/sys/nacl_imc_api.h" #include "native_client/src/trusted/validator/nacl_file_info.h" #include "native_client/src/trusted/weak_ref/call_on_main_thread.h" diff --git a/ppapi/native_client/tests/nacl_browser/fault_injection/fault_pm_nameservice_test.cc b/ppapi/native_client/tests/nacl_browser/fault_injection/fault_pm_nameservice_test.cc index 5e35813..7362b53 100644 --- a/ppapi/native_client/tests/nacl_browser/fault_injection/fault_pm_nameservice_test.cc +++ b/ppapi/native_client/tests/nacl_browser/fault_injection/fault_pm_nameservice_test.cc @@ -21,13 +21,12 @@ #include <unistd.h> #include "native_client/src/include/nacl_scoped_ptr.h" +#include "native_client/src/public/imc_syscalls.h" +#include "native_client/src/public/name_service.h" #include "native_client/src/shared/srpc/nacl_srpc.h" #include "native_client/src/untrusted/nacl_ppapi_util/nacl_ppapi_util.h" #include "native_client/src/untrusted/nacl_ppapi_util/string_buffer.h" -#include <sys/nacl_syscalls.h> -#include <sys/nacl_name_service.h> - #include "ppapi/cpp/instance.h" #include "ppapi/cpp/module.h" #include "ppapi/cpp/var.h" diff --git a/ppapi/native_client/tests/nacl_browser/manifest_file/pm_manifest_file_test.cc b/ppapi/native_client/tests/nacl_browser/manifest_file/pm_manifest_file_test.cc index 186a5eb..9a7ee9b 100644 --- a/ppapi/native_client/tests/nacl_browser/manifest_file/pm_manifest_file_test.cc +++ b/ppapi/native_client/tests/nacl_browser/manifest_file/pm_manifest_file_test.cc @@ -20,6 +20,8 @@ #include <pthread.h> #include "native_client/src/include/nacl_base.h" +#include "native_client/src/public/imc_syscalls.h" +#include "native_client/src/public/name_service.h" #include "native_client/src/shared/platform/nacl_sync.h" #include "native_client/src/shared/platform/nacl_sync_checked.h" #include "native_client/src/shared/platform/nacl_sync_raii.h" @@ -32,9 +34,6 @@ #include "native_client/src/untrusted/nacl_ppapi_util/nacl_ppapi_util.h" #include "native_client/src/untrusted/nacl_ppapi_util/string_buffer.h" -#include <sys/nacl_syscalls.h> -#include <sys/nacl_name_service.h> - #include "ppapi/cpp/instance.h" #include "ppapi/cpp/module.h" #include "ppapi/cpp/var.h" diff --git a/ppapi/native_client/tests/nacl_browser/manifest_file/pm_pre_init_manifest_file_test.cc b/ppapi/native_client/tests/nacl_browser/manifest_file/pm_pre_init_manifest_file_test.cc index 3d4e4e8..b8cbe83 100644 --- a/ppapi/native_client/tests/nacl_browser/manifest_file/pm_pre_init_manifest_file_test.cc +++ b/ppapi/native_client/tests/nacl_browser/manifest_file/pm_pre_init_manifest_file_test.cc @@ -20,6 +20,8 @@ #include <pthread.h> #include "native_client/src/include/nacl_base.h" +#include "native_client/src/public/imc_syscalls.h" +#include "native_client/src/public/name_service.h" #include "native_client/src/shared/platform/nacl_sync.h" #include "native_client/src/shared/platform/nacl_sync_checked.h" #include "native_client/src/shared/platform/nacl_sync_raii.h" @@ -32,9 +34,6 @@ #include "native_client/src/untrusted/nacl_ppapi_util/nacl_ppapi_util.h" #include "native_client/src/untrusted/nacl_ppapi_util/string_buffer.h" -#include <sys/nacl_syscalls.h> -#include <sys/nacl_name_service.h> - #include "native_client/src/shared/ppapi_proxy/ppruntime.h" #include "ppapi/cpp/instance.h" diff --git a/ppapi/native_client/tests/nacl_browser/nameservice/pm_nameservice_test.cc b/ppapi/native_client/tests/nacl_browser/nameservice/pm_nameservice_test.cc index 5e35813..7362b53 100644 --- a/ppapi/native_client/tests/nacl_browser/nameservice/pm_nameservice_test.cc +++ b/ppapi/native_client/tests/nacl_browser/nameservice/pm_nameservice_test.cc @@ -21,13 +21,12 @@ #include <unistd.h> #include "native_client/src/include/nacl_scoped_ptr.h" +#include "native_client/src/public/imc_syscalls.h" +#include "native_client/src/public/name_service.h" #include "native_client/src/shared/srpc/nacl_srpc.h" #include "native_client/src/untrusted/nacl_ppapi_util/nacl_ppapi_util.h" #include "native_client/src/untrusted/nacl_ppapi_util/string_buffer.h" -#include <sys/nacl_syscalls.h> -#include <sys/nacl_name_service.h> - #include "ppapi/cpp/instance.h" #include "ppapi/cpp/module.h" #include "ppapi/cpp/var.h" |