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

Side by Side Diff: mojo/edk/system/data_pipe.h

Issue 2060943007: Make it possible to remove an Awakable with a specific "context" from a Dispatcher. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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/edk/system/core_test_base.cc ('k') | mojo/edk/system/data_pipe.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_EDK_SYSTEM_DATA_PIPE_H_ 5 #ifndef MOJO_EDK_SYSTEM_DATA_PIPE_H_
6 #define MOJO_EDK_SYSTEM_DATA_PIPE_H_ 6 #define MOJO_EDK_SYSTEM_DATA_PIPE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 UserPointer<uint32_t> buffer_num_bytes); 114 UserPointer<uint32_t> buffer_num_bytes);
115 MojoResult ProducerEndWriteData(uint32_t num_bytes_written); 115 MojoResult ProducerEndWriteData(uint32_t num_bytes_written);
116 HandleSignalsState ProducerGetHandleSignalsState(); 116 HandleSignalsState ProducerGetHandleSignalsState();
117 MojoResult ProducerAddAwakable(Awakable* awakable, 117 MojoResult ProducerAddAwakable(Awakable* awakable,
118 MojoHandleSignals signals, 118 MojoHandleSignals signals,
119 bool force, 119 bool force,
120 uint64_t context, 120 uint64_t context,
121 HandleSignalsState* signals_state); 121 HandleSignalsState* signals_state);
122 void ProducerRemoveAwakable(Awakable* awakable, 122 void ProducerRemoveAwakable(Awakable* awakable,
123 HandleSignalsState* signals_state); 123 HandleSignalsState* signals_state);
124 void ProducerRemoveAwakableWithContext(Awakable* awakable,
125 uint64_t context,
126 HandleSignalsState* signals_state);
124 void ProducerStartSerialize(Channel* channel, 127 void ProducerStartSerialize(Channel* channel,
125 size_t* max_size, 128 size_t* max_size,
126 size_t* max_platform_handles); 129 size_t* max_platform_handles);
127 bool ProducerEndSerialize( 130 bool ProducerEndSerialize(
128 Channel* channel, 131 Channel* channel,
129 void* destination, 132 void* destination,
130 size_t* actual_size, 133 size_t* actual_size,
131 std::vector<platform::ScopedPlatformHandle>* platform_handles); 134 std::vector<platform::ScopedPlatformHandle>* platform_handles);
132 135
133 // These are called by the consumer dispatcher to implement its methods of 136 // These are called by the consumer dispatcher to implement its methods of
(...skipping 15 matching lines...) Expand all
149 UserPointer<uint32_t> buffer_num_bytes); 152 UserPointer<uint32_t> buffer_num_bytes);
150 MojoResult ConsumerEndReadData(uint32_t num_bytes_read); 153 MojoResult ConsumerEndReadData(uint32_t num_bytes_read);
151 HandleSignalsState ConsumerGetHandleSignalsState(); 154 HandleSignalsState ConsumerGetHandleSignalsState();
152 MojoResult ConsumerAddAwakable(Awakable* awakable, 155 MojoResult ConsumerAddAwakable(Awakable* awakable,
153 MojoHandleSignals signals, 156 MojoHandleSignals signals,
154 bool force, 157 bool force,
155 uint64_t context, 158 uint64_t context,
156 HandleSignalsState* signals_state); 159 HandleSignalsState* signals_state);
157 void ConsumerRemoveAwakable(Awakable* awakable, 160 void ConsumerRemoveAwakable(Awakable* awakable,
158 HandleSignalsState* signals_state); 161 HandleSignalsState* signals_state);
162 void ConsumerRemoveAwakableWithContext(Awakable* awakable,
163 uint64_t context,
164 HandleSignalsState* signals_state);
159 void ConsumerStartSerialize(Channel* channel, 165 void ConsumerStartSerialize(Channel* channel,
160 size_t* max_size, 166 size_t* max_size,
161 size_t* max_platform_handles); 167 size_t* max_platform_handles);
162 bool ConsumerEndSerialize( 168 bool ConsumerEndSerialize(
163 Channel* channel, 169 Channel* channel,
164 void* destination, 170 void* destination,
165 size_t* actual_size, 171 size_t* actual_size,
166 std::vector<platform::ScopedPlatformHandle>* platform_handles); 172 std::vector<platform::ScopedPlatformHandle>* platform_handles);
167 173
168 // The following are only to be used by |DataPipeImpl| (and its subclasses): 174 // The following are only to be used by |DataPipeImpl| (and its subclasses):
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 uint32_t consumer_two_phase_max_num_bytes_read_ MOJO_GUARDED_BY(mutex_); 313 uint32_t consumer_two_phase_max_num_bytes_read_ MOJO_GUARDED_BY(mutex_);
308 std::unique_ptr<DataPipeImpl> impl_ MOJO_GUARDED_BY(mutex_); 314 std::unique_ptr<DataPipeImpl> impl_ MOJO_GUARDED_BY(mutex_);
309 315
310 MOJO_DISALLOW_COPY_AND_ASSIGN(DataPipe); 316 MOJO_DISALLOW_COPY_AND_ASSIGN(DataPipe);
311 }; 317 };
312 318
313 } // namespace system 319 } // namespace system
314 } // namespace mojo 320 } // namespace mojo
315 321
316 #endif // MOJO_EDK_SYSTEM_DATA_PIPE_H_ 322 #endif // MOJO_EDK_SYSTEM_DATA_PIPE_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/core_test_base.cc ('k') | mojo/edk/system/data_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698