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

Unified Diff: mojo/public/c/system/types.h

Issue 2741353002: Mojo: Add signal for new data pipe consumer data (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/c/system/types.h
diff --git a/mojo/public/c/system/types.h b/mojo/public/c/system/types.h
index 3482d4e17f23713330fd55d9a63677b127cb2f7f..7e02eeb7430f2b960e031a5650d3e23f226a17de 100644
--- a/mojo/public/c/system/types.h
+++ b/mojo/public/c/system/types.h
@@ -149,6 +149,11 @@ const MojoDeadline MOJO_DEADLINE_INDEFINITE = static_cast<MojoDeadline>(-1);
// |MOJO_HANDLE_SIGNAL_READABLE| - Can read (e.g., a message) from the handle.
// |MOJO_HANDLE_SIGNAL_WRITABLE| - Can write (e.g., a message) to the handle.
// |MOJO_HANDLE_SIGNAL_PEER_CLOSED| - The peer handle is closed.
+// |MOJO_HANDLE_SIGNAL_NEW_DATA_READABLE| - Can read data from a data pipe
+// consumer handle (implying MOJO_HANDLE_SIGNAL_READABLE is also set),
+// AND there is some nonzero quantity of new data available on the pipe
+// since the last |MojoReadData()| or |MojoBeginReadData()| call on the
+// handle.
typedef uint32_t MojoHandleSignals;
@@ -157,11 +162,13 @@ const MojoHandleSignals MOJO_HANDLE_SIGNAL_NONE = 0;
const MojoHandleSignals MOJO_HANDLE_SIGNAL_READABLE = 1 << 0;
const MojoHandleSignals MOJO_HANDLE_SIGNAL_WRITABLE = 1 << 1;
const MojoHandleSignals MOJO_HANDLE_SIGNAL_PEER_CLOSED = 1 << 2;
+const MojoHandleSignals MOJO_HANDLE_SIGNAL_NEW_DATA_READABLE = 1 << 3;
#else
#define MOJO_HANDLE_SIGNAL_NONE ((MojoHandleSignals)0)
#define MOJO_HANDLE_SIGNAL_READABLE ((MojoHandleSignals)1 << 0)
#define MOJO_HANDLE_SIGNAL_WRITABLE ((MojoHandleSignals)1 << 1)
#define MOJO_HANDLE_SIGNAL_PEER_CLOSED ((MojoHandleSignals)1 << 2)
+#define MOJO_HANDLE_SIGNAL_NEW_DATA_READABLE ((MojoHandleSignals)1 << 3);
#endif
// |MojoHandleSignalsState|: Returned by wait functions to indicate the
« no previous file with comments | « mojo/public/c/system/tests/core_unittest.cc ('k') | mojo/public/cpp/bindings/tests/handle_passing_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698