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

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
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 MojoRegisterWatcherImpl(MojoHandle handle,
49 MojoHandleSignals signals, 49 MojoHandleSignals signals,
50 MojoWatchCallback callback, 50 MojoWatchCallback callback,
51 uintptr_t context) { 51 uintptr_t context) {
52 return g_core->Watch(handle, signals, callback, context); 52 return g_core->RegisterWatcher(handle, signals, callback, context);
53 } 53 }
54 54
55 MojoResult MojoCancelWatchImpl(MojoHandle handle, uintptr_t context) { 55 MojoResult MojoArmWatcherImpl(MojoHandle handle, uintptr_t context) {
56 return g_core->CancelWatch(handle, context); 56 return g_core->ArmWatcher(handle, context);
57 }
58
59 MojoResult MojoUnregisterWatcherImpl(MojoHandle handle, uintptr_t context) {
60 return g_core->UnregisterWatcher(handle, context);
57 } 61 }
58 62
59 MojoResult MojoAllocMessageImpl(uint32_t num_bytes, 63 MojoResult MojoAllocMessageImpl(uint32_t num_bytes,
60 const MojoHandle* handles, 64 const MojoHandle* handles,
61 uint32_t num_handles, 65 uint32_t num_handles,
62 MojoAllocMessageFlags flags, 66 MojoAllocMessageFlags flags,
63 MojoMessageHandle* message) { 67 MojoMessageHandle* message) {
64 return g_core->AllocMessage(num_bytes, handles, num_handles, flags, message); 68 return g_core->AllocMessage(num_bytes, handles, num_handles, flags, message);
65 } 69 }
66 70
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 MojoBeginReadDataImpl, 284 MojoBeginReadDataImpl,
281 MojoEndReadDataImpl, 285 MojoEndReadDataImpl,
282 MojoCreateSharedBufferImpl, 286 MojoCreateSharedBufferImpl,
283 MojoDuplicateBufferHandleImpl, 287 MojoDuplicateBufferHandleImpl,
284 MojoMapBufferImpl, 288 MojoMapBufferImpl,
285 MojoUnmapBufferImpl, 289 MojoUnmapBufferImpl,
286 MojoCreateWaitSetImpl, 290 MojoCreateWaitSetImpl,
287 MojoAddHandleImpl, 291 MojoAddHandleImpl,
288 MojoRemoveHandleImpl, 292 MojoRemoveHandleImpl,
289 MojoGetReadyHandlesImpl, 293 MojoGetReadyHandlesImpl,
290 MojoWatchImpl, 294 MojoRegisterWatcherImpl,
291 MojoCancelWatchImpl, 295 MojoArmWatcherImpl,
296 MojoUnregisterWatcherImpl,
292 MojoFuseMessagePipesImpl, 297 MojoFuseMessagePipesImpl,
293 MojoWriteMessageNewImpl, 298 MojoWriteMessageNewImpl,
294 MojoReadMessageNewImpl, 299 MojoReadMessageNewImpl,
295 MojoAllocMessageImpl, 300 MojoAllocMessageImpl,
296 MojoFreeMessageImpl, 301 MojoFreeMessageImpl,
297 MojoGetMessageBufferImpl, 302 MojoGetMessageBufferImpl,
298 MojoWrapPlatformHandleImpl, 303 MojoWrapPlatformHandleImpl,
299 MojoUnwrapPlatformHandleImpl, 304 MojoUnwrapPlatformHandleImpl,
300 MojoWrapPlatformSharedBufferHandleImpl, 305 MojoWrapPlatformSharedBufferHandleImpl,
301 MojoUnwrapPlatformSharedBufferHandleImpl, 306 MojoUnwrapPlatformSharedBufferHandleImpl,
302 MojoNotifyBadMessageImpl, 307 MojoNotifyBadMessageImpl,
303 MojoGetPropertyImpl}; 308 MojoGetPropertyImpl};
304 return system_thunks; 309 return system_thunks;
305 } 310 }
306 311
307 } // namespace edk 312 } // namespace edk
308 } // namespace mojo 313 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698