Index: mojo/public/c/system/types.h |
diff --git a/mojo/public/c/system/types.h b/mojo/public/c/system/types.h |
index 6d21b12a172aefc805a98354479dd1fd1ceaef52..76ef5638c4cc168d7367bb0cdfebb58d2ef28c14 100644 |
--- a/mojo/public/c/system/types.h |
+++ b/mojo/public/c/system/types.h |
@@ -33,6 +33,21 @@ const MojoHandle MOJO_HANDLE_INVALID = 0; |
#define MOJO_HANDLE_INVALID ((MojoHandle)0) |
#endif |
+// |MojoPlatformHandle|: A handle to an OS object. On POSIX systems this is |
+// generally a file descriptor. On OS X it might be a Mach port. On Windows, |
+// it's a HANDLE. |
+// |
+// |MOJO_PLATFORM_HANDLE_INVALID| - A value that is never treated as a valid |
+// platform handle. |
+ |
+typedef uint64_t MojoPlatformHandle; |
Anand Mistry (off Chromium)
2016/05/20 06:25:40
I don't like the fact that the meaning here is con
Ken Rockot(use gerrit already)
2016/05/20 22:19:43
I took it a step further and decided we should hav
|
+ |
+#ifdef __cplusplus |
+const MojoPlatformHandle MOJO_PLATFORM_HANDLE_INVALID = 0xffffffffffffffffULL; |
Anand Mistry (off Chromium)
2016/05/20 06:25:40
static_cast<>(-1) is the common pattern here.
Ken Rockot(use gerrit already)
2016/05/20 22:19:43
WontFix (Obsolete)
With a concept of "handle type
|
+#else |
+#define MOJO_PLATFORM_HANDLE_INVALID ((MojoPlatformHandle)0xffffffffffffffffULL) |
+#endif |
+ |
// |MojoResult|: Result codes for Mojo operations. The only success code is zero |
// (|MOJO_RESULT_OK|); all non-zero values should be considered as error/failure |
// codes (even if the value is not recognized). |