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

Side by Side Diff: mojo/monacl/gen/libmojo.cc.template

Issue 385983008: Mojo + NaCl prototype. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dead files Created 6 years, 4 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
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
Mark Seaborn 2014/08/26 16:25:52 Could you name this "*template.cc" so that it gets
Nick Bray (chromium) 2014/09/03 23:45:02 I suspect the fact it isn't a syntactically valid
5 // WARNING this file was generated by $script_name
Mark Seaborn 2014/08/26 16:25:52 Rather confusing because this file *isn't* generat
Nick Bray (chromium) 2014/09/03 23:45:02 Done.
6 // Do not edit by hand.
7
8 #include <errno.h>
9
10 #include "mojo/public/c/system/core.h"
11 #include "native_client/src/public/imc_syscalls.h"
12 #include "native_client/src/public/imc_types.h"
13
14 #define NACL_MOJO_DESC 8
Mark Seaborn 2014/08/26 16:25:52 No need to hard-code this. Use NACL_CHROME_DESC_B
Nick Bray (chromium) 2014/09/03 23:45:02 Done, but it doesn't seem right to add a dependanc
Mark Seaborn 2014/09/09 19:13:10 It seems right to me.
15
16 static void DoMojoCall(uint32_t params[], int numParams) {
17 NaClAbiNaClImcMsgIoVec iov[1] = {
18 {params, numParams}
Mark Seaborn 2014/08/26 16:25:52 Style nit: num_params
Nick Bray (chromium) 2014/09/03 23:45:02 Done.
19 };
20 NaClAbiNaClImcMsgHdr msgh = {iov, 1, NULL, 0};
21 // Note: return value unchecked. We're relying on the result parameter being
22 // unmodified - if the syscall fails, the Mojo function will return whatever
23 // the result parameter was initialized to before this function was called.
24 imc_sendmsg(NACL_MOJO_DESC, &msgh, 0);
25 }
26
27 $body
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698