| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |