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

Side by Side Diff: mojo/nacl/generator/interface.py

Issue 776643004: Update NaCl's generator to support new wait APIs. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: The Change Created 6 years 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
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 # pylint: disable=F0401 5 # pylint: disable=F0401
6 6
7 import interface_dsl 7 import interface_dsl
8 8
9 def MakeInterface(): 9 def MakeInterface():
10 mojo = interface_dsl.Interface() 10 mojo = interface_dsl.Interface()
11 11
12 f = mojo.Func('MojoCreateSharedBuffer', 'MojoResult') 12 f = mojo.Func('MojoCreateSharedBuffer', 'MojoResult')
13 f.Param('options').InStruct('MojoCreateSharedBufferOptions').Optional() 13 f.Param('options').InExtStruct('MojoCreateSharedBufferOptions').Optional()
14 f.Param('num_bytes').In('uint64_t') 14 f.Param('num_bytes').In('uint64_t')
15 f.Param('shared_buffer_handle').Out('MojoHandle') 15 f.Param('shared_buffer_handle').Out('MojoHandle')
16 16
17 f = mojo.Func('MojoDuplicateBufferHandle', 'MojoResult') 17 f = mojo.Func('MojoDuplicateBufferHandle', 'MojoResult')
18 f.Param('buffer_handle').In('MojoHandle') 18 f.Param('buffer_handle').In('MojoHandle')
19 f.Param('options').InStruct('MojoDuplicateBufferHandleOptions').Optional() 19 f.Param('options').InExtStruct('MojoDuplicateBufferHandleOptions').Optional()
20 f.Param('new_buffer_handle').Out('MojoHandle') 20 f.Param('new_buffer_handle').Out('MojoHandle')
21 21
22 f = mojo.Func('MojoMapBuffer', 'MojoResult') 22 f = mojo.Func('MojoMapBuffer', 'MojoResult')
23 f.Param('buffer_handle').In('MojoHandle') 23 f.Param('buffer_handle').In('MojoHandle')
24 f.Param('offset').In('uint64_t') 24 f.Param('offset').In('uint64_t')
25 f.Param('num_bytes').In('uint64_t') 25 f.Param('num_bytes').In('uint64_t')
26 f.Param('buffer').Out('void*') 26 f.Param('buffer').Out('void*')
27 f.Param('flags').In('MojoMapBufferFlags') 27 f.Param('flags').In('MojoMapBufferFlags')
28 28
29 f = mojo.Func('MojoUnmapBuffer', 'MojoResult') 29 f = mojo.Func('MojoUnmapBuffer', 'MojoResult')
30 f.Param('buffer').In('void*') 30 f.Param('buffer').In('void*')
31 31
32 f = mojo.Func('MojoCreateDataPipe', 'MojoResult') 32 f = mojo.Func('MojoCreateDataPipe', 'MojoResult')
33 f.Param('options').InStruct('MojoCreateDataPipeOptions').Optional() 33 f.Param('options').InExtStruct('MojoCreateDataPipeOptions').Optional()
34 f.Param('data_pipe_producer_handle').Out('MojoHandle') 34 f.Param('data_pipe_producer_handle').Out('MojoHandle')
35 f.Param('data_pipe_consumer_handle').Out('MojoHandle') 35 f.Param('data_pipe_consumer_handle').Out('MojoHandle')
36 36
37 f = mojo.Func('MojoWriteData', 'MojoResult') 37 f = mojo.Func('MojoWriteData', 'MojoResult')
38 f.Param('data_pipe_producer_handle').In('MojoHandle') 38 f.Param('data_pipe_producer_handle').In('MojoHandle')
39 f.Param('elements').InArray('void', 'num_bytes') 39 f.Param('elements').InArray('void', 'num_bytes')
40 f.Param('num_bytes').InOut('uint32_t') 40 f.Param('num_bytes').InOut('uint32_t')
41 f.Param('flags').In('MojoWriteDataFlags') 41 f.Param('flags').In('MojoWriteDataFlags')
42 42
43 f = mojo.Func('MojoBeginWriteData', 'MojoResult') 43 f = mojo.Func('MojoBeginWriteData', 'MojoResult')
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 f.Param('handle').In('MojoHandle') 75 f.Param('handle').In('MojoHandle')
76 f.Param('signals').In('MojoHandleSignals') 76 f.Param('signals').In('MojoHandleSignals')
77 f.Param('deadline').In('MojoDeadline') 77 f.Param('deadline').In('MojoDeadline')
78 78
79 f = mojo.Func('MojoWaitMany', 'MojoResult') 79 f = mojo.Func('MojoWaitMany', 'MojoResult')
80 f.Param('handles').InArray('MojoHandle', 'num_handles') 80 f.Param('handles').InArray('MojoHandle', 'num_handles')
81 f.Param('signals').InArray('MojoHandleSignals', 'num_handles') 81 f.Param('signals').InArray('MojoHandleSignals', 'num_handles')
82 f.Param('num_handles').In('uint32_t') 82 f.Param('num_handles').In('uint32_t')
83 f.Param('deadline').In('MojoDeadline') 83 f.Param('deadline').In('MojoDeadline')
84 84
85 f = mojo.Func('MojoNewWait', 'MojoResult')
86 f.Param('handle').In('MojoHandle')
87 f.Param('signals').In('MojoHandleSignals')
88 f.Param('deadline').In('MojoDeadline')
89 f.Param('signals_state').OutFixedStruct('MojoHandleSignalsState').Optional()
90
91 f = mojo.Func('MojoNewWaitMany', 'MojoResult')
92 f.Param('handles').InArray('MojoHandle', 'num_handles')
93 f.Param('signals').InArray('MojoHandleSignals', 'num_handles')
94 f.Param('num_handles').In('uint32_t')
95 f.Param('deadline').In('MojoDeadline')
96 f.Param('result_index').Out('uint32_t').Optional()
97 p = f.Param('signals_states')
98 p.OutArray('MojoHandleSignalsState', 'num_handles').Optional()
99
85 f = mojo.Func('MojoCreateMessagePipe', 'MojoResult') 100 f = mojo.Func('MojoCreateMessagePipe', 'MojoResult')
86 f.Param('options').InStruct('MojoCreateMessagePipeOptions').Optional() 101 f.Param('options').InExtStruct('MojoCreateMessagePipeOptions').Optional()
87 f.Param('message_pipe_handle0').Out('MojoHandle') 102 f.Param('message_pipe_handle0').Out('MojoHandle')
88 f.Param('message_pipe_handle1').Out('MojoHandle') 103 f.Param('message_pipe_handle1').Out('MojoHandle')
89 104
90 f = mojo.Func('MojoWriteMessage', 'MojoResult') 105 f = mojo.Func('MojoWriteMessage', 'MojoResult')
91 f.Param('message_pipe_handle').In('MojoHandle') 106 f.Param('message_pipe_handle').In('MojoHandle')
92 f.Param('bytes').InArray('void', 'num_bytes').Optional() 107 f.Param('bytes').InArray('void', 'num_bytes').Optional()
93 f.Param('num_bytes').In('uint32_t') 108 f.Param('num_bytes').In('uint32_t')
94 f.Param('handles').InArray('MojoHandle', 'num_handles').Optional() 109 f.Param('handles').InArray('MojoHandle', 'num_handles').Optional()
95 f.Param('num_handles').In('uint32_t') 110 f.Param('num_handles').In('uint32_t')
96 f.Param('flags').In('MojoWriteMessageFlags') 111 f.Param('flags').In('MojoWriteMessageFlags')
97 112
98 f = mojo.Func('MojoReadMessage', 'MojoResult') 113 f = mojo.Func('MojoReadMessage', 'MojoResult')
99 f.Param('message_pipe_handle').In('MojoHandle') 114 f.Param('message_pipe_handle').In('MojoHandle')
100 f.Param('bytes').OutArray('void', 'num_bytes').Optional() 115 f.Param('bytes').OutArray('void', 'num_bytes').Optional()
101 f.Param('num_bytes').InOut('uint32_t').Optional() 116 f.Param('num_bytes').InOut('uint32_t').Optional()
102 f.Param('handles').OutArray('MojoHandle', 'num_handles').Optional() 117 f.Param('handles').OutArray('MojoHandle', 'num_handles').Optional()
103 f.Param('num_handles').InOut('uint32_t').Optional() 118 f.Param('num_handles').InOut('uint32_t').Optional()
104 f.Param('flags').In('MojoReadMessageFlags') 119 f.Param('flags').In('MojoReadMessageFlags')
105 120
106 mojo.Finalize() 121 mojo.Finalize()
107 122
108 return mojo 123 return mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698