| 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/data_pipe.h" | 5 #include "mojo/system/data_pipe.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <limits> | 10 #include <limits> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "mojo/edk/system/constants.h" | 14 #include "mojo/system/constants.h" |
| 15 #include "mojo/edk/system/memory.h" | 15 #include "mojo/system/memory.h" |
| 16 #include "mojo/edk/system/options_validation.h" | 16 #include "mojo/system/options_validation.h" |
| 17 #include "mojo/edk/system/waiter_list.h" | 17 #include "mojo/system/waiter_list.h" |
| 18 | 18 |
| 19 namespace mojo { | 19 namespace mojo { |
| 20 namespace system { | 20 namespace system { |
| 21 | 21 |
| 22 // static | 22 // static |
| 23 const MojoCreateDataPipeOptions DataPipe::kDefaultCreateOptions = { | 23 const MojoCreateDataPipeOptions DataPipe::kDefaultCreateOptions = { |
| 24 static_cast<uint32_t>(sizeof(MojoCreateDataPipeOptions)), | 24 static_cast<uint32_t>(sizeof(MojoCreateDataPipeOptions)), |
| 25 MOJO_CREATE_DATA_PIPE_OPTIONS_FLAG_NONE, 1u, | 25 MOJO_CREATE_DATA_PIPE_OPTIONS_FLAG_NONE, 1u, |
| 26 static_cast<uint32_t>(kDefaultDataPipeCapacityBytes)}; | 26 static_cast<uint32_t>(kDefaultDataPipeCapacityBytes)}; |
| 27 | 27 |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 void DataPipe::AwakeConsumerWaitersForStateChangeNoLock( | 464 void DataPipe::AwakeConsumerWaitersForStateChangeNoLock( |
| 465 const HandleSignalsState& new_consumer_state) { | 465 const HandleSignalsState& new_consumer_state) { |
| 466 lock_.AssertAcquired(); | 466 lock_.AssertAcquired(); |
| 467 if (!has_local_consumer_no_lock()) | 467 if (!has_local_consumer_no_lock()) |
| 468 return; | 468 return; |
| 469 consumer_waiter_list_->AwakeWaitersForStateChange(new_consumer_state); | 469 consumer_waiter_list_->AwakeWaitersForStateChange(new_consumer_state); |
| 470 } | 470 } |
| 471 | 471 |
| 472 } // namespace system | 472 } // namespace system |
| 473 } // namespace mojo | 473 } // namespace mojo |
| OLD | NEW |