| 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 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ | 5 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ |
| 6 #define MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ | 6 #define MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "mojo/public/c/system/core.h" | 10 #include "mojo/public/c/system/core.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // Structure used to bind the basic Mojo Core functions of a DSO to those of | 30 // Structure used to bind the basic Mojo Core functions of a DSO to those of |
| 31 // the embedder. | 31 // the embedder. |
| 32 // This is the ABI between the embedder and the DSO. It can only have new | 32 // This is the ABI between the embedder and the DSO. It can only have new |
| 33 // functions added to the end. No other changes are supported. | 33 // functions added to the end. No other changes are supported. |
| 34 #pragma pack(push, 8) | 34 #pragma pack(push, 8) |
| 35 struct MojoSystemThunks { | 35 struct MojoSystemThunks { |
| 36 size_t size; // Should be set to sizeof(MojoSystemThunks). | 36 size_t size; // Should be set to sizeof(MojoSystemThunks). |
| 37 MojoTimeTicks (*GetTimeTicksNow)(); | 37 MojoTimeTicks (*GetTimeTicksNow)(); |
| 38 MojoResult (*Close)(MojoHandle handle); | 38 MojoResult (*Close)(MojoHandle handle); |
| 39 MojoResult (*Wait)(MojoHandle handle, | 39 MojoResult (*Wait)(MojoHandle handle, |
| 40 MojoWaitFlags flags, | 40 MojoHandleSignals signals, |
| 41 MojoDeadline deadline); | 41 MojoDeadline deadline); |
| 42 MojoResult (*WaitMany)(const MojoHandle* handles, | 42 MojoResult (*WaitMany)(const MojoHandle* handles, |
| 43 const MojoWaitFlags* flags, | 43 const MojoHandleSignals* signals, |
| 44 uint32_t num_handles, | 44 uint32_t num_handles, |
| 45 MojoDeadline deadline); | 45 MojoDeadline deadline); |
| 46 MojoResult (*CreateMessagePipe)(const MojoCreateMessagePipeOptions* options, | 46 MojoResult (*CreateMessagePipe)(const MojoCreateMessagePipeOptions* options, |
| 47 MojoHandle* message_pipe_handle0, | 47 MojoHandle* message_pipe_handle0, |
| 48 MojoHandle* message_pipe_handle1); | 48 MojoHandle* message_pipe_handle1); |
| 49 MojoResult (*WriteMessage)(MojoHandle message_pipe_handle, | 49 MojoResult (*WriteMessage)(MojoHandle message_pipe_handle, |
| 50 const void* bytes, | 50 const void* bytes, |
| 51 uint32_t num_bytes, | 51 uint32_t num_bytes, |
| 52 const MojoHandle* handles, | 52 const MojoHandle* handles, |
| 53 uint32_t num_handles, | 53 uint32_t num_handles, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // Use this type for the function found by dynamically discovering it in | 128 // Use this type for the function found by dynamically discovering it in |
| 129 // a DSO linked with mojo_system. For example: | 129 // a DSO linked with mojo_system. For example: |
| 130 // MojoSetSystemThunksFn mojo_set_system_thunks_fn = | 130 // MojoSetSystemThunksFn mojo_set_system_thunks_fn = |
| 131 // reinterpret_cast<MojoSetSystemThunksFn>(app_library.GetFunctionPointer( | 131 // reinterpret_cast<MojoSetSystemThunksFn>(app_library.GetFunctionPointer( |
| 132 // "MojoSetSystemThunks")); | 132 // "MojoSetSystemThunks")); |
| 133 // The expected size of |system_thunks} is returned. | 133 // The expected size of |system_thunks} is returned. |
| 134 // The contents of |system_thunks| are copied. | 134 // The contents of |system_thunks| are copied. |
| 135 typedef size_t (*MojoSetSystemThunksFn)(const MojoSystemThunks* system_thunks); | 135 typedef size_t (*MojoSetSystemThunksFn)(const MojoSystemThunks* system_thunks); |
| 136 | 136 |
| 137 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ | 137 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_SYSTEM_THUNKS_H_ |
| OLD | NEW |