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

Unified Diff: mojo/system/core.cc

Issue 23621056: Initial in-process implementation of some Mojo primitives. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: mojo/system/core.cc
diff --git a/mojo/system/core.cc b/mojo/system/core.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5367fd31d77cf9aafe19eadbe3020df40b7abf0d
--- /dev/null
+++ b/mojo/system/core.cc
@@ -0,0 +1,53 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "mojo/public/system/core.h"
+
+#include "mojo/system/core_impl.h"
+
+extern "C" {
+
+MojoResult MojoClose(MojoHandle handle) {
+ return mojo::system::CoreImpl::Get()->Close(handle);
+}
+
+MojoResult MojoWait(MojoHandle handle,
+ MojoWaitFlags flags,
+ MojoDeadline deadline) {
+ return mojo::system::CoreImpl::Get()->Wait(handle, flags, deadline);
+}
+
+MojoResult MojoWaitMany(const MojoHandle* handles,
+ const MojoWaitFlags* flags,
+ uint32_t num_handles,
+ MojoDeadline deadline) {
+ return mojo::system::CoreImpl::Get()->WaitMany(handles, flags, num_handles,
+ deadline);
+}
+
+MojoResult MojoCreateMessagePipe(MojoHandle* handle_0, MojoHandle* handle_1) {
+ return mojo::system::CoreImpl::Get()->CreateMessagePipe(handle_0, handle_1);
+}
+
+MojoResult MojoWriteMessage(MojoHandle handle,
+ const void* bytes, uint32_t num_bytes,
+ const MojoHandle* handles, uint32_t num_handles,
+ MojoWriteMessageFlags flags) {
+ return mojo::system::CoreImpl::Get()->WriteMessage(handle,
+ bytes, num_bytes,
+ handles, num_handles,
+ flags);
+}
+
+MojoResult MojoReadMessage(MojoHandle handle,
+ void* bytes, uint32_t* num_bytes,
+ MojoHandle* handles, uint32_t* num_handles,
+ MojoReadMessageFlags flags) {
+ return mojo::system::CoreImpl::Get()->ReadMessage(handle,
+ bytes, num_bytes,
+ handles, num_handles,
+ flags);
+}
+
+} // extern "C"
« mojo/mojo.gyp ('K') | « mojo/public/tests/test_support.cc ('k') | mojo/system/core_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698