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

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

Issue 2106433002: Add thunks for wait set operations, together with public tests. (Closed) Base URL: https://github.com/domokit/mojo.git@work791_wait_set_6-x-work790_wait_set_5.4
Patch Set: doh Created 4 years, 5 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/nacl/nonsfi/irt_mojo_nonsfi.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"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 void** buffer, 211 void** buffer,
212 MojoMapBufferFlags flags) { 212 MojoMapBufferFlags flags) {
213 return g_core->MapBuffer(buffer_handle, offset, num_bytes, 213 return g_core->MapBuffer(buffer_handle, offset, num_bytes,
214 MakeUserPointer(buffer), flags); 214 MakeUserPointer(buffer), flags);
215 } 215 }
216 216
217 MojoResult MojoUnmapBuffer(void* buffer) { 217 MojoResult MojoUnmapBuffer(void* buffer) {
218 return g_core->UnmapBuffer(MakeUserPointer(buffer)); 218 return g_core->UnmapBuffer(MakeUserPointer(buffer));
219 } 219 }
220 220
221 MojoResult MojoCreateWaitSet(const struct MojoCreateWaitSetOptions* options,
222 MojoHandle* handle) {
223 return g_core->CreateWaitSet(MakeUserPointer(options),
224 MakeUserPointer(handle));
225 }
226
227 MojoResult MojoWaitSetAdd(MojoHandle wait_set_handle,
228 MojoHandle handle,
229 MojoHandleSignals signals,
230 uint64_t cookie,
231 const struct MojoWaitSetAddOptions* options) {
232 return g_core->WaitSetAdd(wait_set_handle, handle, signals, cookie,
233 MakeUserPointer(options));
234 }
235
236 MojoResult MojoWaitSetRemove(MojoHandle wait_set_handle, uint64_t cookie) {
237 return g_core->WaitSetRemove(wait_set_handle, cookie);
238 }
239
240 MojoResult MojoWaitSetWait(MojoHandle wait_set_handle,
241 MojoDeadline deadline,
242 uint32_t* num_results,
243 struct MojoWaitSetResult* results,
244 uint32_t* max_results) {
245 return g_core->WaitSetWait(
246 wait_set_handle, deadline, MakeUserPointer(num_results),
247 MakeUserPointer(results), MakeUserPointer(max_results));
248 }
249
221 } // extern "C" 250 } // extern "C"
OLDNEW
« no previous file with comments | « no previous file | mojo/nacl/nonsfi/irt_mojo_nonsfi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698