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

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

Issue 1964953002: Add rights for mapping buffer. Update (shared) buffer APIs. (Closed) Base URL: https://github.com/domokit/mojo.git@work787_edk_handle_14.4
Patch Set: Created 4 years, 7 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/public/c/system/buffer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/c/system/handle.h
diff --git a/mojo/public/c/system/handle.h b/mojo/public/c/system/handle.h
index 096a2482f418df3646631e67ed64fbca4c0ee2fd..445558c38fa2ad7901e575a560456c30bbaddd78 100644
--- a/mojo/public/c/system/handle.h
+++ b/mojo/public/c/system/handle.h
@@ -35,6 +35,12 @@ typedef uint32_t MojoHandle;
// message).
// |MOJO_HANDLE_RIGHT_GET_OPTIONS| - Right to get a handle's options.
// |MOJO_HANDLE_RIGHT_SET_OPTIONS| - Right to set a handle's options.
+// |MOJO_HANDLE_RIGHT_MAP_READABLE| - Right to "map" a (e.g., buffer) handle
+// as readable memory.
+// |MOJO_HANDLE_RIGHT_MAP_WRITABLE| - Right to "map" a (e.g., buffer) handle
+// as writable memory.
+// |MOJO_HANDLE_RIGHT_MAP_EXECUTABLE| - Right to "map" a (e.g., buffer) handle
+// as executable memory.
//
// TODO(vtl): Add rights support/checking to existing handle types.
@@ -47,6 +53,9 @@ typedef uint32_t MojoHandleRights;
#define MOJO_HANDLE_RIGHT_WRITE ((MojoHandleRights)1 << 3)
#define MOJO_HANDLE_RIGHT_GET_OPTIONS ((MojoHandleRights)1 << 4)
#define MOJO_HANDLE_RIGHT_SET_OPTIONS ((MojoHandleRights)1 << 5)
+#define MOJO_HANDLE_RIGHT_MAP_READABLE ((MojoHandleRights)1 << 6)
+#define MOJO_HANDLE_RIGHT_MAP_WRITABLE ((MojoHandleRights)1 << 7)
+#define MOJO_HANDLE_RIGHT_MAP_EXECUTABLE ((MojoHandleRights)1 << 8)
// |MojoHandleSignals|: Used to specify signals that can be waited on for a
// handle (and which can be triggered), e.g., the ability to read or write to
@@ -79,6 +88,7 @@ typedef uint32_t MojoHandleSignals;
// determine which, if any, of the signals can still be satisfied.
// Note: This struct is not extensible (and only has 32-bit quantities), so it's
// 32-bit-aligned.
+
azani 2016/05/10 18:44:50 Nit: did you mean to add that extra blank line?
MOJO_STATIC_ASSERT(MOJO_ALIGNOF(uint32_t) == 4, "uint32_t has weird alignment");
struct MOJO_ALIGNAS(4) MojoHandleSignalsState {
MojoHandleSignals satisfied_signals;
« no previous file with comments | « mojo/public/c/system/buffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698