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

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

Issue 2725133002: Mojo: Armed Watchers (Closed)
Patch Set: . Created 3 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 | « mojo/common/data_pipe_drainer.cc ('k') | mojo/edk/js/drain_data.h » ('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 "mojo/edk/embedder/entrypoints.h" 5 #include "mojo/edk/embedder/entrypoints.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "mojo/edk/embedder/embedder_internal.h" 9 #include "mojo/edk/embedder/embedder_internal.h"
10 #include "mojo/edk/system/core.h" 10 #include "mojo/edk/system/core.h"
(...skipping 27 matching lines...) Expand all
38 MojoResult MojoWaitManyImpl(const MojoHandle* handles, 38 MojoResult MojoWaitManyImpl(const MojoHandle* handles,
39 const MojoHandleSignals* signals, 39 const MojoHandleSignals* signals,
40 uint32_t num_handles, 40 uint32_t num_handles,
41 MojoDeadline deadline, 41 MojoDeadline deadline,
42 uint32_t* result_index, 42 uint32_t* result_index,
43 MojoHandleSignalsState* signals_states) { 43 MojoHandleSignalsState* signals_states) {
44 return g_core->WaitMany(handles, signals, num_handles, deadline, result_index, 44 return g_core->WaitMany(handles, signals, num_handles, deadline, result_index,
45 signals_states); 45 signals_states);
46 } 46 }
47 47
48 MojoResult MojoWatchImpl(MojoHandle handle, 48 MojoResult MojoCreateWatcherImpl(MojoWatcherCallback callback,
49 MojoHandleSignals signals, 49 MojoHandle* watcher_handle) {
50 MojoWatchCallback callback, 50 return g_core->CreateWatcher(callback, watcher_handle);
51 uintptr_t context) {
52 return g_core->Watch(handle, signals, callback, context);
53 } 51 }
54 52
55 MojoResult MojoCancelWatchImpl(MojoHandle handle, uintptr_t context) { 53 MojoResult MojoArmWatcherImpl(MojoHandle watcher_handle,
56 return g_core->CancelWatch(handle, context); 54 uint32_t* num_ready_contexts,
55 uintptr_t* ready_contexts,
56 MojoResult* ready_results,
57 MojoHandleSignalsState* ready_signals_states) {
58 return g_core->ArmWatcher(watcher_handle, num_ready_contexts, ready_contexts,
59 ready_results, ready_signals_states);
60 }
61
62 MojoResult MojoWatchImpl(MojoHandle watcher_handle,
63 MojoHandle handle,
64 MojoHandleSignals signals,
65 uintptr_t context) {
66 return g_core->Watch(watcher_handle, handle, signals, context);
67 }
68
69 MojoResult MojoCancelWatchImpl(MojoHandle watcher_handle, uintptr_t context) {
70 return g_core->CancelWatch(watcher_handle, context);
57 } 71 }
58 72
59 MojoResult MojoAllocMessageImpl(uint32_t num_bytes, 73 MojoResult MojoAllocMessageImpl(uint32_t num_bytes,
60 const MojoHandle* handles, 74 const MojoHandle* handles,
61 uint32_t num_handles, 75 uint32_t num_handles,
62 MojoAllocMessageFlags flags, 76 MojoAllocMessageFlags flags,
63 MojoMessageHandle* message) { 77 MojoMessageHandle* message) {
64 return g_core->AllocMessage(num_bytes, handles, num_handles, flags, message); 78 return g_core->AllocMessage(num_bytes, handles, num_handles, flags, message);
65 } 79 }
66 80
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 MojoBeginReadDataImpl, 294 MojoBeginReadDataImpl,
281 MojoEndReadDataImpl, 295 MojoEndReadDataImpl,
282 MojoCreateSharedBufferImpl, 296 MojoCreateSharedBufferImpl,
283 MojoDuplicateBufferHandleImpl, 297 MojoDuplicateBufferHandleImpl,
284 MojoMapBufferImpl, 298 MojoMapBufferImpl,
285 MojoUnmapBufferImpl, 299 MojoUnmapBufferImpl,
286 MojoCreateWaitSetImpl, 300 MojoCreateWaitSetImpl,
287 MojoAddHandleImpl, 301 MojoAddHandleImpl,
288 MojoRemoveHandleImpl, 302 MojoRemoveHandleImpl,
289 MojoGetReadyHandlesImpl, 303 MojoGetReadyHandlesImpl,
304 MojoCreateWatcherImpl,
290 MojoWatchImpl, 305 MojoWatchImpl,
291 MojoCancelWatchImpl, 306 MojoCancelWatchImpl,
307 MojoArmWatcherImpl,
292 MojoFuseMessagePipesImpl, 308 MojoFuseMessagePipesImpl,
293 MojoWriteMessageNewImpl, 309 MojoWriteMessageNewImpl,
294 MojoReadMessageNewImpl, 310 MojoReadMessageNewImpl,
295 MojoAllocMessageImpl, 311 MojoAllocMessageImpl,
296 MojoFreeMessageImpl, 312 MojoFreeMessageImpl,
297 MojoGetMessageBufferImpl, 313 MojoGetMessageBufferImpl,
298 MojoWrapPlatformHandleImpl, 314 MojoWrapPlatformHandleImpl,
299 MojoUnwrapPlatformHandleImpl, 315 MojoUnwrapPlatformHandleImpl,
300 MojoWrapPlatformSharedBufferHandleImpl, 316 MojoWrapPlatformSharedBufferHandleImpl,
301 MojoUnwrapPlatformSharedBufferHandleImpl, 317 MojoUnwrapPlatformSharedBufferHandleImpl,
302 MojoNotifyBadMessageImpl, 318 MojoNotifyBadMessageImpl,
303 MojoGetPropertyImpl}; 319 MojoGetPropertyImpl};
304 return system_thunks; 320 return system_thunks;
305 } 321 }
306 322
307 } // namespace edk 323 } // namespace edk
308 } // namespace mojo 324 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/common/data_pipe_drainer.cc ('k') | mojo/edk/js/drain_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698