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 #include <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include "mojo/edk/embedder/embedder_internal.h" | 7 #include "mojo/edk/embedder/embedder_internal.h" |
8 #include "mojo/edk/system/core.h" | 8 #include "mojo/edk/system/core.h" |
9 #include "mojo/public/c/system/buffer.h" | 9 #include "mojo/public/c/system/buffer.h" |
10 #include "mojo/public/c/system/data_pipe.h" | 10 #include "mojo/public/c/system/data_pipe.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 MojoResult MojoWaitMany(const MojoHandle* handles, | 35 MojoResult MojoWaitMany(const MojoHandle* handles, |
36 const MojoHandleSignals* signals, | 36 const MojoHandleSignals* signals, |
37 uint32_t num_handles, | 37 uint32_t num_handles, |
38 MojoDeadline deadline, | 38 MojoDeadline deadline, |
39 uint32_t* result_index, | 39 uint32_t* result_index, |
40 MojoHandleSignalsState* signals_states) { | 40 MojoHandleSignalsState* signals_states) { |
41 return g_core->WaitMany(handles, signals, num_handles, deadline, result_index, | 41 return g_core->WaitMany(handles, signals, num_handles, deadline, result_index, |
42 signals_states); | 42 signals_states); |
43 } | 43 } |
44 | 44 |
| 45 MojoResult MojoWatch(MojoHandle handle, |
| 46 MojoHandleSignals signals, |
| 47 MojoWatchCallback callback, |
| 48 uintptr_t context) { |
| 49 return g_core->Watch(handle, signals, callback, context); |
| 50 } |
| 51 |
| 52 MojoResult MojoCancelWatch(MojoHandle handle, uintptr_t context) { |
| 53 return g_core->CancelWatch(handle, context); |
| 54 } |
| 55 |
45 MojoResult MojoCreateWaitSet(MojoHandle* wait_set_handle) { | 56 MojoResult MojoCreateWaitSet(MojoHandle* wait_set_handle) { |
46 return g_core->CreateWaitSet(wait_set_handle); | 57 return g_core->CreateWaitSet(wait_set_handle); |
47 } | 58 } |
48 | 59 |
49 MojoResult MojoAddHandle(MojoHandle wait_set_handle, | 60 MojoResult MojoAddHandle(MojoHandle wait_set_handle, |
50 MojoHandle handle, | 61 MojoHandle handle, |
51 MojoHandleSignals signals) { | 62 MojoHandleSignals signals) { |
52 return g_core->AddHandle(wait_set_handle, handle, signals); | 63 return g_core->AddHandle(wait_set_handle, handle, signals); |
53 } | 64 } |
54 | 65 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 void** buffer, | 173 void** buffer, |
163 MojoMapBufferFlags flags) { | 174 MojoMapBufferFlags flags) { |
164 return g_core->MapBuffer(buffer_handle, offset, num_bytes, buffer, flags); | 175 return g_core->MapBuffer(buffer_handle, offset, num_bytes, buffer, flags); |
165 } | 176 } |
166 | 177 |
167 MojoResult MojoUnmapBuffer(void* buffer) { | 178 MojoResult MojoUnmapBuffer(void* buffer) { |
168 return g_core->UnmapBuffer(buffer); | 179 return g_core->UnmapBuffer(buffer); |
169 } | 180 } |
170 | 181 |
171 } // extern "C" | 182 } // extern "C" |
OLD | NEW |