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

Side by Side Diff: mojo/edk/embedder/entrypoints.cc

Issue 1993283002: Add thunks for MojoGetRights(), etc. (Closed) Base URL: https://github.com/domokit/mojo.git@work795_core_get_rights
Patch Set: I'm an idiot Created 4 years, 7 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 | « no previous file | mojo/edk/embedder/system_impl_private_entrypoints.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file contains the definitions of the system functions, which are 5 // This file contains the definitions of the system functions, which are
6 // declared in various header files in mojo/public/c/system. 6 // declared in various header files in mojo/public/c/system.
7 7
8 #include "mojo/edk/embedder/embedder_internal.h" 8 #include "mojo/edk/embedder/embedder_internal.h"
9 #include "mojo/edk/system/core.h" 9 #include "mojo/edk/system/core.h"
10 #include "mojo/public/c/system/buffer.h" 10 #include "mojo/public/c/system/buffer.h"
11 #include "mojo/public/c/system/data_pipe.h" 11 #include "mojo/public/c/system/data_pipe.h"
12 #include "mojo/public/c/system/handle.h" 12 #include "mojo/public/c/system/handle.h"
13 #include "mojo/public/c/system/message_pipe.h" 13 #include "mojo/public/c/system/message_pipe.h"
14 #include "mojo/public/c/system/time.h" 14 #include "mojo/public/c/system/time.h"
15 #include "mojo/public/c/system/wait.h" 15 #include "mojo/public/c/system/wait.h"
16 16
17 using mojo::embedder::internal::g_core; 17 using mojo::embedder::internal::g_core;
18 using mojo::system::MakeUserPointer; 18 using mojo::system::MakeUserPointer;
19 19
20 extern "C" { 20 extern "C" {
21 21
22 MojoTimeTicks MojoGetTimeTicksNow() { 22 MojoTimeTicks MojoGetTimeTicksNow() {
23 return g_core->GetTimeTicksNow(); 23 return g_core->GetTimeTicksNow();
24 } 24 }
25 25
26 MojoResult MojoClose(MojoHandle handle) { 26 MojoResult MojoClose(MojoHandle handle) {
27 return g_core->Close(handle); 27 return g_core->Close(handle);
28 } 28 }
29 29
30 MojoResult MojoGetRights(MojoHandle handle, MojoHandleRights* rights) {
31 return g_core->GetRights(handle, MakeUserPointer(rights));
32 }
33
30 MojoResult MojoWait(MojoHandle handle, 34 MojoResult MojoWait(MojoHandle handle,
31 MojoHandleSignals signals, 35 MojoHandleSignals signals,
32 MojoDeadline deadline, 36 MojoDeadline deadline,
33 MojoHandleSignalsState* signals_state) { 37 MojoHandleSignalsState* signals_state) {
34 return g_core->Wait(handle, signals, deadline, 38 return g_core->Wait(handle, signals, deadline,
35 MakeUserPointer(signals_state)); 39 MakeUserPointer(signals_state));
36 } 40 }
37 41
38 MojoResult MojoWaitMany(const MojoHandle* handles, 42 MojoResult MojoWaitMany(const MojoHandle* handles,
39 const MojoHandleSignals* signals, 43 const MojoHandleSignals* signals,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 MojoMapBufferFlags flags) { 192 MojoMapBufferFlags flags) {
189 return g_core->MapBuffer(buffer_handle, offset, num_bytes, 193 return g_core->MapBuffer(buffer_handle, offset, num_bytes,
190 MakeUserPointer(buffer), flags); 194 MakeUserPointer(buffer), flags);
191 } 195 }
192 196
193 MojoResult MojoUnmapBuffer(void* buffer) { 197 MojoResult MojoUnmapBuffer(void* buffer) {
194 return g_core->UnmapBuffer(MakeUserPointer(buffer)); 198 return g_core->UnmapBuffer(MakeUserPointer(buffer));
195 } 199 }
196 200
197 } // extern "C" 201 } // extern "C"
OLDNEW
« no previous file with comments | « no previous file | mojo/edk/embedder/system_impl_private_entrypoints.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698