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/edk/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 #include <memory> | 11 #include <memory> |
12 #include <utility> | 12 #include <utility> |
13 | 13 |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/memory/aligned_memory.h" | 15 #include "base/memory/aligned_memory.h" |
16 #include "mojo/edk/system/awakable_list.h" | 16 #include "mojo/edk/system/awakable_list.h" |
17 #include "mojo/edk/system/channel.h" | 17 #include "mojo/edk/system/channel.h" |
18 #include "mojo/edk/system/configuration.h" | 18 #include "mojo/edk/system/configuration.h" |
19 #include "mojo/edk/system/data_pipe_impl.h" | 19 #include "mojo/edk/system/data_pipe_impl.h" |
20 #include "mojo/edk/system/incoming_endpoint.h" | 20 #include "mojo/edk/system/incoming_endpoint.h" |
21 #include "mojo/edk/system/local_data_pipe_impl.h" | 21 #include "mojo/edk/system/local_data_pipe_impl.h" |
22 #include "mojo/edk/system/memory.h" | 22 #include "mojo/edk/system/memory.h" |
23 #include "mojo/edk/system/options_validation.h" | 23 #include "mojo/edk/system/options_validation.h" |
24 #include "mojo/edk/system/remote_consumer_data_pipe_impl.h" | 24 #include "mojo/edk/system/remote_consumer_data_pipe_impl.h" |
25 #include "mojo/edk/system/remote_producer_data_pipe_impl.h" | 25 #include "mojo/edk/system/remote_producer_data_pipe_impl.h" |
26 #include "mojo/edk/util/make_unique.h" | 26 #include "mojo/edk/util/make_unique.h" |
27 | 27 |
| 28 using mojo::util::MutexLocker; |
28 using mojo::util::RefPtr; | 29 using mojo::util::RefPtr; |
29 | 30 |
30 namespace mojo { | 31 namespace mojo { |
31 namespace system { | 32 namespace system { |
32 | 33 |
33 // static | 34 // static |
34 MojoCreateDataPipeOptions DataPipe::GetDefaultCreateOptions() { | 35 MojoCreateDataPipeOptions DataPipe::GetDefaultCreateOptions() { |
35 MojoCreateDataPipeOptions result = { | 36 MojoCreateDataPipeOptions result = { |
36 static_cast<uint32_t>(sizeof(MojoCreateDataPipeOptions)), | 37 static_cast<uint32_t>(sizeof(MojoCreateDataPipeOptions)), |
37 MOJO_CREATE_DATA_PIPE_OPTIONS_FLAG_NONE, | 38 MOJO_CREATE_DATA_PIPE_OPTIONS_FLAG_NONE, |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 SetProducerClosedNoLock(); | 806 SetProducerClosedNoLock(); |
806 } | 807 } |
807 | 808 |
808 void DataPipe::SetConsumerClosed() { | 809 void DataPipe::SetConsumerClosed() { |
809 MutexLocker locker(&mutex_); | 810 MutexLocker locker(&mutex_); |
810 SetConsumerClosedNoLock(); | 811 SetConsumerClosedNoLock(); |
811 } | 812 } |
812 | 813 |
813 } // namespace system | 814 } // namespace system |
814 } // namespace mojo | 815 } // namespace mojo |
OLD | NEW |