1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 #include "mojo/public/c/system/core.h"
8 #include "native_client/src/public/chrome_main.h"
9 #include "native_client/src/public/imc_syscalls.h"
10 #include "native_client/src/public/imc_types.h"
12 #define NACL_MOJO_DESC (NACL_CHROME_DESC_BASE + 2)
14 static void DoMojoCall(uint32_t params[], nacl_abi_size_t num_params) {
15 NaClAbiNaClImcMsgIoVec iov[1] = {
18 NaClAbiNaClImcMsgHdr msgh = {iov, 1, NULL, 0};
19 // Note: return value unchecked. We're relying on the result parameter being
20 // unmodified - if the syscall fails, the Mojo function will return whatever
21 // the result parameter was initialized to before this function was called.
22 imc_sendmsg(NACL_MOJO_DESC, &msgh, 0);