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

Side by Side Diff: mojo/edk/system/message_pipe_dispatcher.cc

Issue 2088833003: Add different behavior to AwakableList for "persistent" vs "one-shot" awakables. (Closed) Base URL: https://github.com/domokit/mojo.git@work793_wait_set_4.5
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/message_pipe_dispatcher.h ('k') | mojo/edk/system/message_pipe_endpoint.h » ('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 #include "mojo/edk/system/message_pipe_dispatcher.h" 5 #include "mojo/edk/system/message_pipe_dispatcher.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "mojo/edk/system/configuration.h" 10 #include "mojo/edk/system/configuration.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 HandleSignalsState MessagePipeDispatcher::GetHandleSignalsStateImplNoLock() 197 HandleSignalsState MessagePipeDispatcher::GetHandleSignalsStateImplNoLock()
198 const { 198 const {
199 mutex().AssertHeld(); 199 mutex().AssertHeld();
200 return message_pipe_->GetHandleSignalsState(port_); 200 return message_pipe_->GetHandleSignalsState(port_);
201 } 201 }
202 202
203 MojoResult MessagePipeDispatcher::AddAwakableImplNoLock( 203 MojoResult MessagePipeDispatcher::AddAwakableImplNoLock(
204 Awakable* awakable, 204 Awakable* awakable,
205 uint64_t context, 205 uint64_t context,
206 bool force, 206 bool persistent,
207 MojoHandleSignals signals, 207 MojoHandleSignals signals,
208 HandleSignalsState* signals_state) { 208 HandleSignalsState* signals_state) {
209 mutex().AssertHeld(); 209 mutex().AssertHeld();
210 return message_pipe_->AddAwakable(port_, awakable, context, force, signals, 210 return message_pipe_->AddAwakable(port_, awakable, context, persistent,
211 signals_state); 211 signals, signals_state);
212 } 212 }
213 213
214 void MessagePipeDispatcher::RemoveAwakableImplNoLock( 214 void MessagePipeDispatcher::RemoveAwakableImplNoLock(
215 bool match_context, 215 bool match_context,
216 Awakable* awakable, 216 Awakable* awakable,
217 uint64_t context, 217 uint64_t context,
218 HandleSignalsState* signals_state) { 218 HandleSignalsState* signals_state) {
219 mutex().AssertHeld(); 219 mutex().AssertHeld();
220 message_pipe_->RemoveAwakable(port_, match_context, awakable, context, 220 message_pipe_->RemoveAwakable(port_, match_context, awakable, context,
221 signals_state); 221 signals_state);
(...skipping 17 matching lines...) Expand all
239 239
240 bool rv = message_pipe_->EndSerialize(port_, channel, destination, 240 bool rv = message_pipe_->EndSerialize(port_, channel, destination,
241 actual_size, platform_handles); 241 actual_size, platform_handles);
242 message_pipe_ = nullptr; 242 message_pipe_ = nullptr;
243 port_ = kInvalidPort; 243 port_ = kInvalidPort;
244 return rv; 244 return rv;
245 } 245 }
246 246
247 } // namespace system 247 } // namespace system
248 } // namespace mojo 248 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/message_pipe_dispatcher.h ('k') | mojo/edk/system/message_pipe_endpoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698