| 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 basic functions common to different Mojo system APIs. | 5 // This file contains basic functions common to different Mojo system APIs. |
| 6 // | 6 // |
| 7 // Note: This header should be compilable as C. | 7 // Note: This header should be compilable as C. |
| 8 | 8 |
| 9 #ifndef MOJO_PUBLIC_C_SYSTEM_FUNCTIONS_H_ | 9 #ifndef MOJO_PUBLIC_C_SYSTEM_FUNCTIONS_H_ |
| 10 #define MOJO_PUBLIC_C_SYSTEM_FUNCTIONS_H_ | 10 #define MOJO_PUBLIC_C_SYSTEM_FUNCTIONS_H_ |
| 11 | 11 |
| 12 // Note: This header should be compilable as C. | 12 // Note: This header should be compilable as C. |
| 13 | 13 |
| 14 #include "mojo/public/c/system/system_export.h" | 14 #include "mojo/public/c/system/system_export.h" |
| 15 #include "mojo/public/c/system/types.h" | 15 #include "mojo/public/c/system/types.h" |
| 16 | 16 |
| 17 #ifdef __cplusplus |
| 18 extern "C" { |
| 19 #endif |
| 20 |
| 17 // Note: Pointer parameters that are labelled "optional" may be null (at least | 21 // Note: Pointer parameters that are labelled "optional" may be null (at least |
| 18 // under some circumstances). Non-const pointer parameters are also labeled | 22 // under some circumstances). Non-const pointer parameters are also labeled |
| 19 // "in", "out", or "in/out", to indicate how they are used. (Note that how/if | 23 // "in", "out", or "in/out", to indicate how they are used. (Note that how/if |
| 20 // such a parameter is used may depend on other parameters or the requested | 24 // such a parameter is used may depend on other parameters or the requested |
| 21 // operation's success/failure. E.g., a separate |flags| parameter may control | 25 // operation's success/failure. E.g., a separate |flags| parameter may control |
| 22 // whether a given "in/out" parameter is used for input, output, or both.) | 26 // whether a given "in/out" parameter is used for input, output, or both.) |
| 23 | 27 |
| 24 #ifdef __cplusplus | |
| 25 extern "C" { | |
| 26 #endif | |
| 27 | |
| 28 // Platform-dependent monotonically increasing tick count representing "right | 28 // Platform-dependent monotonically increasing tick count representing "right |
| 29 // now." The resolution of this clock is ~1-15ms. Resolution varies depending | 29 // now." The resolution of this clock is ~1-15ms. Resolution varies depending |
| 30 // on hardware/operating system configuration. | 30 // on hardware/operating system configuration. |
| 31 MOJO_SYSTEM_EXPORT MojoTimeTicks MojoGetTimeTicksNow(); | 31 MOJO_SYSTEM_EXPORT MojoTimeTicks MojoGetTimeTicksNow(); |
| 32 | 32 |
| 33 // Closes the given |handle|. | 33 // Closes the given |handle|. |
| 34 // | 34 // |
| 35 // Returns: | 35 // Returns: |
| 36 // |MOJO_RESULT_OK| on success. | 36 // |MOJO_RESULT_OK| on success. |
| 37 // |MOJO_RESULT_INVALID_ARGUMENT| if |handle| is not a valid handle. | 37 // |MOJO_RESULT_INVALID_ARGUMENT| if |handle| is not a valid handle. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 MOJO_SYSTEM_EXPORT MojoResult MojoWaitMany(const MojoHandle* handles, | 78 MOJO_SYSTEM_EXPORT MojoResult MojoWaitMany(const MojoHandle* handles, |
| 79 const MojoWaitFlags* flags, | 79 const MojoWaitFlags* flags, |
| 80 uint32_t num_handles, | 80 uint32_t num_handles, |
| 81 MojoDeadline deadline); | 81 MojoDeadline deadline); |
| 82 | 82 |
| 83 #ifdef __cplusplus | 83 #ifdef __cplusplus |
| 84 } // extern "C" | 84 } // extern "C" |
| 85 #endif | 85 #endif |
| 86 | 86 |
| 87 #endif // MOJO_PUBLIC_C_SYSTEM_FUNCTIONS_H_ | 87 #endif // MOJO_PUBLIC_C_SYSTEM_FUNCTIONS_H_ |
| OLD | NEW |