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

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

Issue 2068483002: Add an unconditional version of DispatcherAddAwakable(): AddAwakableUnconditional(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: oops 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 MojoHandleSignals signals, 205 MojoHandleSignals signals,
206 bool force,
206 uint64_t context, 207 uint64_t context,
207 HandleSignalsState* signals_state) { 208 HandleSignalsState* signals_state) {
208 mutex().AssertHeld(); 209 mutex().AssertHeld();
209 return message_pipe_->AddAwakable(port_, awakable, signals, context, 210 return message_pipe_->AddAwakable(port_, awakable, signals, force, context,
210 signals_state); 211 signals_state);
211 } 212 }
212 213
213 void MessagePipeDispatcher::RemoveAwakableImplNoLock( 214 void MessagePipeDispatcher::RemoveAwakableImplNoLock(
214 Awakable* awakable, 215 Awakable* awakable,
215 HandleSignalsState* signals_state) { 216 HandleSignalsState* signals_state) {
216 mutex().AssertHeld(); 217 mutex().AssertHeld();
217 message_pipe_->RemoveAwakable(port_, awakable, signals_state); 218 message_pipe_->RemoveAwakable(port_, awakable, signals_state);
218 } 219 }
219 220
(...skipping 15 matching lines...) Expand all
235 236
236 bool rv = message_pipe_->EndSerialize(port_, channel, destination, 237 bool rv = message_pipe_->EndSerialize(port_, channel, destination,
237 actual_size, platform_handles); 238 actual_size, platform_handles);
238 message_pipe_ = nullptr; 239 message_pipe_ = nullptr;
239 port_ = kInvalidPort; 240 port_ = kInvalidPort;
240 return rv; 241 return rv;
241 } 242 }
242 243
243 } // namespace system 244 } // namespace system
244 } // namespace mojo 245 } // 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