 Chromium Code Reviews
 Chromium Code Reviews Issue 385983008:
  Mojo + NaCl prototype.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 385983008:
  Mojo + NaCl prototype.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| OLD | NEW | 
|---|---|
| (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 <errno.h> | |
| 
Mark Seaborn
2014/09/09 19:13:11
I think this isn't used.
 
Nick Bray (chromium)
2014/09/09 23:12:33
Done.
 | |
| 8 | |
| 9 #include "mojo/public/c/system/core.h" | |
| 10 #include "native_client/src/public/chrome_main.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 (NACL_CHROME_DESC_BASE + 2) | |
| 15 | |
| 16 static void DoMojoCall(uint32_t params[], int num_params) { | |
| 17 NaClAbiNaClImcMsgIoVec iov[1] = { | |
| 18 {params, num_params} | |
| 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 | |
| OLD | NEW |