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

Side by Side Diff: mojo/public/c/system/thunks.h

Issue 2750273002: Revert of Mojo EDK: Introduce MojoQueryHandleSignalsState API (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « mojo/public/c/system/tests/core_unittest_pure_c.c ('k') | mojo/public/c/system/thunks.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Note: This header should be compilable as C. 5 // Note: This header should be compilable as C.
6 6
7 #ifndef MOJO_PUBLIC_C_SYSTEM_THUNKS_H_ 7 #ifndef MOJO_PUBLIC_C_SYSTEM_THUNKS_H_
8 #define MOJO_PUBLIC_C_SYSTEM_THUNKS_H_ 8 #define MOJO_PUBLIC_C_SYSTEM_THUNKS_H_
9 9
10 #include <stddef.h> 10 #include <stddef.h>
11 #include <stdint.h> 11 #include <stdint.h>
12 12
13 #include "mojo/public/c/system/core.h" 13 #include "mojo/public/c/system/core.h"
14 #include "mojo/public/c/system/system_export.h" 14 #include "mojo/public/c/system/system_export.h"
15 15
16 // Structure used to bind the basic Mojo Core functions to an embedder 16 // Structure used to bind the basic Mojo Core functions to an embedder
17 // implementation. This is intended to eventually be used as a stable ABI 17 // implementation. This is intended to eventually be used as a stable ABI
18 // between a Mojo embedder and some loaded application code, but for now it is 18 // between a Mojo embedder and some loaded application code, but for now it is
19 // still effectively safe to rearrange entries as needed. 19 // still effectively safe to rearrange entries as needed.
20 #pragma pack(push, 8) 20 #pragma pack(push, 8)
21 struct MojoSystemThunks { 21 struct MojoSystemThunks {
22 size_t size; // Should be set to sizeof(MojoSystemThunks). 22 size_t size; // Should be set to sizeof(MojoSystemThunks).
23 MojoTimeTicks (*GetTimeTicksNow)(); 23 MojoTimeTicks (*GetTimeTicksNow)();
24 MojoResult (*Close)(MojoHandle handle); 24 MojoResult (*Close)(MojoHandle handle);
25 MojoResult (*QueryHandleSignalsState)(
26 MojoHandle handle,
27 struct MojoHandleSignalsState* signals_state);
28 MojoResult (*Wait)(MojoHandle handle, 25 MojoResult (*Wait)(MojoHandle handle,
29 MojoHandleSignals signals, 26 MojoHandleSignals signals,
30 MojoDeadline deadline, 27 MojoDeadline deadline,
31 struct MojoHandleSignalsState* signals_state); 28 struct MojoHandleSignalsState* signals_state);
32 MojoResult (*WaitMany)(const MojoHandle* handles, 29 MojoResult (*WaitMany)(const MojoHandle* handles,
33 const MojoHandleSignals* signals, 30 const MojoHandleSignals* signals,
34 uint32_t num_handles, 31 uint32_t num_handles,
35 MojoDeadline deadline, 32 MojoDeadline deadline,
36 uint32_t* result_index, 33 uint32_t* result_index,
37 struct MojoHandleSignalsState* signals_states); 34 struct MojoHandleSignalsState* signals_states);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // The contents of |system_thunks| are copied. 158 // The contents of |system_thunks| are copied.
162 typedef size_t (*MojoSetSystemThunksFn)( 159 typedef size_t (*MojoSetSystemThunksFn)(
163 const struct MojoSystemThunks* system_thunks); 160 const struct MojoSystemThunks* system_thunks);
164 161
165 // A function for setting up the embedder's own system thunks. This should only 162 // A function for setting up the embedder's own system thunks. This should only
166 // be called by Mojo embedder code. 163 // be called by Mojo embedder code.
167 MOJO_SYSTEM_EXPORT size_t MojoEmbedderSetSystemThunks( 164 MOJO_SYSTEM_EXPORT size_t MojoEmbedderSetSystemThunks(
168 const struct MojoSystemThunks* system_thunks); 165 const struct MojoSystemThunks* system_thunks);
169 166
170 #endif // MOJO_PUBLIC_C_SYSTEM_THUNKS_H_ 167 #endif // MOJO_PUBLIC_C_SYSTEM_THUNKS_H_
OLDNEW
« no previous file with comments | « mojo/public/c/system/tests/core_unittest_pure_c.c ('k') | mojo/public/c/system/thunks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698