| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file contains types and constants/macros common to different Mojo system | 5 // This file contains types and constants/macros common to different Mojo system |
| 6 // APIs. | 6 // APIs. |
| 7 // |
| 8 // Note: This header should be compilable as C. |
| 7 | 9 |
| 8 #ifndef MOJO_PUBLIC_C_SYSTEM_TYPES_H_ | 10 #ifndef MOJO_PUBLIC_C_SYSTEM_TYPES_H_ |
| 9 #define MOJO_PUBLIC_C_SYSTEM_TYPES_H_ | 11 #define MOJO_PUBLIC_C_SYSTEM_TYPES_H_ |
| 10 | 12 |
| 11 // Note: This header should be compilable as C. | |
| 12 | |
| 13 #include <stdint.h> | 13 #include <stdint.h> |
| 14 | 14 |
| 15 // Types/constants ------------------------------------------------------------- | |
| 16 | |
| 17 // TODO(vtl): Notes: Use of undefined flags will lead to undefined behavior | 15 // TODO(vtl): Notes: Use of undefined flags will lead to undefined behavior |
| 18 // (typically they'll be ignored), not necessarily an error. | 16 // (typically they'll be ignored), not necessarily an error. |
| 19 | 17 |
| 20 // |MojoTimeTicks|: Used to specify time ticks. Value is in microseconds. | 18 // |MojoTimeTicks|: Used to specify time ticks. Value is in microseconds. |
| 21 | 19 |
| 22 typedef int64_t MojoTimeTicks; | 20 typedef int64_t MojoTimeTicks; |
| 23 | 21 |
| 24 // |MojoHandle|: Handles to Mojo objects. | 22 // |MojoHandle|: Handles to Mojo objects. |
| 25 // |MOJO_HANDLE_INVALID| - A value that is never a valid handle. | 23 // |MOJO_HANDLE_INVALID| - A value that is never a valid handle. |
| 26 | 24 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 const MojoWaitFlags MOJO_WAIT_FLAG_WRITABLE = 1 << 1; | 156 const MojoWaitFlags MOJO_WAIT_FLAG_WRITABLE = 1 << 1; |
| 159 const MojoWaitFlags MOJO_WAIT_FLAG_EVERYTHING = ~0; | 157 const MojoWaitFlags MOJO_WAIT_FLAG_EVERYTHING = ~0; |
| 160 #else | 158 #else |
| 161 #define MOJO_WAIT_FLAG_NONE ((MojoWaitFlags) 0) | 159 #define MOJO_WAIT_FLAG_NONE ((MojoWaitFlags) 0) |
| 162 #define MOJO_WAIT_FLAG_READABLE ((MojoWaitFlags) 1 << 0) | 160 #define MOJO_WAIT_FLAG_READABLE ((MojoWaitFlags) 1 << 0) |
| 163 #define MOJO_WAIT_FLAG_WRITABLE ((MojoWaitFlags) 1 << 1) | 161 #define MOJO_WAIT_FLAG_WRITABLE ((MojoWaitFlags) 1 << 1) |
| 164 #define MOJO_WAIT_FLAG_EVERYTHING (~((MojoWaitFlags) 0)) | 162 #define MOJO_WAIT_FLAG_EVERYTHING (~((MojoWaitFlags) 0)) |
| 165 #endif | 163 #endif |
| 166 | 164 |
| 167 #endif // MOJO_PUBLIC_C_SYSTEM_TYPES_H_ | 165 #endif // MOJO_PUBLIC_C_SYSTEM_TYPES_H_ |
| OLD | NEW |