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

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

Issue 1748503002: [mojo-edk] Add MojoWatch and MojoCancelWatch APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert RequestContext usage, nits Created 4 years, 9 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/system/BUILD.gn » ('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 #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
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
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"
OLDNEW
« no previous file with comments | « no previous file | mojo/edk/system/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698