| 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.h" | 5 #include "mojo/edk/system/message_pipe.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 185 |
| 186 MutexLocker locker(&mutex_); | 186 MutexLocker locker(&mutex_); |
| 187 DCHECK(endpoints_[port]); | 187 DCHECK(endpoints_[port]); |
| 188 | 188 |
| 189 return endpoints_[port]->GetHandleSignalsState(); | 189 return endpoints_[port]->GetHandleSignalsState(); |
| 190 } | 190 } |
| 191 | 191 |
| 192 MojoResult MessagePipe::AddAwakable(unsigned port, | 192 MojoResult MessagePipe::AddAwakable(unsigned port, |
| 193 Awakable* awakable, | 193 Awakable* awakable, |
| 194 uint64_t context, | 194 uint64_t context, |
| 195 bool force, | 195 bool persistent, |
| 196 MojoHandleSignals signals, | 196 MojoHandleSignals signals, |
| 197 HandleSignalsState* signals_state) { | 197 HandleSignalsState* signals_state) { |
| 198 DCHECK(port == 0 || port == 1); | 198 DCHECK(port == 0 || port == 1); |
| 199 | 199 |
| 200 MutexLocker locker(&mutex_); | 200 MutexLocker locker(&mutex_); |
| 201 DCHECK(endpoints_[port]); | 201 DCHECK(endpoints_[port]); |
| 202 | 202 |
| 203 return endpoints_[port]->AddAwakable(awakable, context, force, signals, | 203 return endpoints_[port]->AddAwakable(awakable, context, persistent, signals, |
| 204 signals_state); | 204 signals_state); |
| 205 } | 205 } |
| 206 | 206 |
| 207 void MessagePipe::RemoveAwakable(unsigned port, | 207 void MessagePipe::RemoveAwakable(unsigned port, |
| 208 bool match_context, | 208 bool match_context, |
| 209 Awakable* awakable, | 209 Awakable* awakable, |
| 210 uint64_t context, | 210 uint64_t context, |
| 211 HandleSignalsState* signals_state) { | 211 HandleSignalsState* signals_state) { |
| 212 DCHECK(port == 0 || port == 1); | 212 DCHECK(port == 0 || port == 1); |
| 213 | 213 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 LOG(WARNING) << "Enqueueing null dispatcher"; | 374 LOG(WARNING) << "Enqueueing null dispatcher"; |
| 375 handles->push_back(Handle()); | 375 handles->push_back(Handle()); |
| 376 } | 376 } |
| 377 } | 377 } |
| 378 message->SetHandles(std::move(handles)); | 378 message->SetHandles(std::move(handles)); |
| 379 return MOJO_RESULT_OK; | 379 return MOJO_RESULT_OK; |
| 380 } | 380 } |
| 381 | 381 |
| 382 } // namespace system | 382 } // namespace system |
| 383 } // namespace mojo | 383 } // namespace mojo |
| OLD | NEW |