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

Side by Side Diff: mojo/nacl/generator/libmojo.cc.tmpl

Issue 385983008: Mojo + NaCl prototype. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: FinalEdits Created 6 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « mojo/nacl/generator/interface_dsl.py ('k') | mojo/nacl/generator/mojo_syscall.cc.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 {{generator_warning}}
6
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"
11
12 #define NACL_MOJO_DESC (NACL_CHROME_DESC_BASE + 2)
13
14 static void DoMojoCall(uint32_t params[], int num_params) {
15 NaClAbiNaClImcMsgIoVec iov[1] = {
16 {params, num_params}
17 };
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);
23 }
24
25 {{body}}
OLDNEW
« no previous file with comments | « mojo/nacl/generator/interface_dsl.py ('k') | mojo/nacl/generator/mojo_syscall.cc.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698