| OLD | NEW |
| 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 Loading... |
| 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" |
| OLD | NEW |