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

Unified Diff: mojo/edk/system/dispatcher.cc

Issue 1885663002: EDK: Add implementation of data pipe producer write threshold stuff. (Closed) Base URL: https://github.com/domokit/mojo.git@master
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 | « mojo/edk/system/dispatcher.h ('k') | mojo/edk/system/dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/dispatcher.cc
diff --git a/mojo/edk/system/dispatcher.cc b/mojo/edk/system/dispatcher.cc
index 1c98a99f5b2684ceb868a802cdba296b73f58603..386fa0eae9a213d0e4d5d774d99049df8329f6aa 100644
--- a/mojo/edk/system/dispatcher.cc
+++ b/mojo/edk/system/dispatcher.cc
@@ -140,6 +140,25 @@ MojoResult Dispatcher::ReadMessage(UserPointer<void> bytes,
flags);
}
+MojoResult Dispatcher::SetDataPipeProducerOptions(
+ UserPointer<const MojoDataPipeProducerOptions> options) {
+ MutexLocker locker(&mutex_);
+ if (is_closed_)
+ return MOJO_RESULT_INVALID_ARGUMENT;
+
+ return SetDataPipeProducerOptionsImplNoLock(options);
+}
+
+MojoResult Dispatcher::GetDataPipeProducerOptions(
+ UserPointer<MojoDataPipeProducerOptions> options,
+ uint32_t options_num_bytes) {
+ MutexLocker locker(&mutex_);
+ if (is_closed_)
+ return MOJO_RESULT_INVALID_ARGUMENT;
+
+ return GetDataPipeProducerOptionsImplNoLock(options, options_num_bytes);
+}
+
MojoResult Dispatcher::WriteData(UserPointer<const void> elements,
UserPointer<uint32_t> num_bytes,
MojoWriteDataFlags flags) {
@@ -326,6 +345,21 @@ MojoResult Dispatcher::ReadMessageImplNoLock(
return MOJO_RESULT_INVALID_ARGUMENT;
}
+MojoResult Dispatcher::SetDataPipeProducerOptionsImplNoLock(
+ UserPointer<const MojoDataPipeProducerOptions> /*options*/) {
+ mutex_.AssertHeld();
+ DCHECK(!is_closed_);
+ return MOJO_RESULT_INVALID_ARGUMENT;
+}
+
+MojoResult Dispatcher::GetDataPipeProducerOptionsImplNoLock(
+ UserPointer<MojoDataPipeProducerOptions> /*options*/,
+ uint32_t /*options_num_bytes*/) {
+ mutex_.AssertHeld();
+ DCHECK(!is_closed_);
+ return MOJO_RESULT_INVALID_ARGUMENT;
+}
+
MojoResult Dispatcher::WriteDataImplNoLock(UserPointer<const void> /*elements*/,
UserPointer<uint32_t> /*num_bytes*/,
MojoWriteDataFlags /*flags*/) {
« no previous file with comments | « mojo/edk/system/dispatcher.h ('k') | mojo/edk/system/dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698