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

Unified Diff: mojo/edk/embedder/entrypoints.cc

Issue 1865533002: Add Mojo{Set,Get}DataPipeConsumerOptions() to the standard/native system thunks. (Closed) Base URL: https://github.com/domokit/mojo.git@work786_dp_read_threshold
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | mojo/public/c/system/tests/core_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/entrypoints.cc
diff --git a/mojo/edk/embedder/entrypoints.cc b/mojo/edk/embedder/entrypoints.cc
index 7ee0c9e53f9fcf6fe843ac688eca6ec92bd7a45a..875f1cfecc61ca2a0f02f2c85554e4558509af09 100644
--- a/mojo/edk/embedder/entrypoints.cc
+++ b/mojo/edk/embedder/entrypoints.cc
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// This file contains the definitions of the system functions, which are
+// declared in various header files in mojo/public/c/system.
+
#include "mojo/edk/embedder/embedder_internal.h"
#include "mojo/edk/system/core.h"
#include "mojo/public/c/system/buffer.h"
@@ -14,7 +17,6 @@
using mojo::embedder::internal::g_core;
using mojo::system::MakeUserPointer;
-// Definitions of the system functions.
extern "C" {
MojoTimeTicks MojoGetTimeTicksNow() {
@@ -104,6 +106,21 @@ MojoResult MojoEndWriteData(MojoHandle data_pipe_producer_handle,
return g_core->EndWriteData(data_pipe_producer_handle, num_elements_written);
}
+MojoResult MojoSetDataPipeConsumerOptions(
+ MojoHandle data_pipe_consumer_handle,
+ const struct MojoDataPipeConsumerOptions* options) {
+ return g_core->SetDataPipeConsumerOptions(data_pipe_consumer_handle,
+ MakeUserPointer(options));
+}
+
+MojoResult MojoGetDataPipeConsumerOptions(
+ MojoHandle data_pipe_consumer_handle,
+ struct MojoDataPipeConsumerOptions* options,
+ uint32_t options_num_bytes) {
+ return g_core->GetDataPipeConsumerOptions(
+ data_pipe_consumer_handle, MakeUserPointer(options), options_num_bytes);
+}
+
MojoResult MojoReadData(MojoHandle data_pipe_consumer_handle,
void* elements,
uint32_t* num_elements,
« no previous file with comments | « no previous file | mojo/public/c/system/tests/core_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698