OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef MOJO_EDK_SYSTEM_DATA_PIPE_IMPL_H_ | 5 #ifndef MOJO_EDK_SYSTEM_DATA_PIPE_IMPL_H_ |
6 #define MOJO_EDK_SYSTEM_DATA_PIPE_IMPL_H_ | 6 #define MOJO_EDK_SYSTEM_DATA_PIPE_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 return owner_->validated_options(); | 137 return owner_->validated_options(); |
138 } | 138 } |
139 size_t element_num_bytes() const { return owner_->element_num_bytes(); } | 139 size_t element_num_bytes() const { return owner_->element_num_bytes(); } |
140 size_t capacity_num_bytes() const { return owner_->capacity_num_bytes(); } | 140 size_t capacity_num_bytes() const { return owner_->capacity_num_bytes(); } |
141 bool producer_open() const MOJO_NO_THREAD_SAFETY_ANALYSIS { | 141 bool producer_open() const MOJO_NO_THREAD_SAFETY_ANALYSIS { |
142 return owner_->producer_open_no_lock(); | 142 return owner_->producer_open_no_lock(); |
143 } | 143 } |
144 bool consumer_open() const MOJO_NO_THREAD_SAFETY_ANALYSIS { | 144 bool consumer_open() const MOJO_NO_THREAD_SAFETY_ANALYSIS { |
145 return owner_->consumer_open_no_lock(); | 145 return owner_->consumer_open_no_lock(); |
146 } | 146 } |
| 147 size_t producer_write_threshold_num_bytes() const |
| 148 MOJO_NO_THREAD_SAFETY_ANALYSIS { |
| 149 return owner_->producer_write_threshold_num_bytes_no_lock(); |
| 150 } |
147 size_t consumer_read_threshold_num_bytes() const | 151 size_t consumer_read_threshold_num_bytes() const |
148 MOJO_NO_THREAD_SAFETY_ANALYSIS { | 152 MOJO_NO_THREAD_SAFETY_ANALYSIS { |
149 return owner_->consumer_read_threshold_num_bytes_no_lock(); | 153 return owner_->consumer_read_threshold_num_bytes_no_lock(); |
150 } | 154 } |
151 uint32_t producer_two_phase_max_num_bytes_written() const | 155 uint32_t producer_two_phase_max_num_bytes_written() const |
152 MOJO_NO_THREAD_SAFETY_ANALYSIS { | 156 MOJO_NO_THREAD_SAFETY_ANALYSIS { |
153 return owner_->producer_two_phase_max_num_bytes_written_no_lock(); | 157 return owner_->producer_two_phase_max_num_bytes_written_no_lock(); |
154 } | 158 } |
155 uint32_t consumer_two_phase_max_num_bytes_read() const | 159 uint32_t consumer_two_phase_max_num_bytes_read() const |
156 MOJO_NO_THREAD_SAFETY_ANALYSIS { | 160 MOJO_NO_THREAD_SAFETY_ANALYSIS { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 struct MOJO_ALIGNAS(8) SerializedDataPipeConsumerDispatcher { | 201 struct MOJO_ALIGNAS(8) SerializedDataPipeConsumerDispatcher { |
198 // Only validated (and thus canonicalized) options should be serialized. | 202 // Only validated (and thus canonicalized) options should be serialized. |
199 // However, the deserializer must revalidate (as with everything received). | 203 // However, the deserializer must revalidate (as with everything received). |
200 MojoCreateDataPipeOptions validated_options; | 204 MojoCreateDataPipeOptions validated_options; |
201 }; | 205 }; |
202 | 206 |
203 } // namespace system | 207 } // namespace system |
204 } // namespace mojo | 208 } // namespace mojo |
205 | 209 |
206 #endif // MOJO_EDK_SYSTEM_DATA_PIPE_IMPL_H_ | 210 #endif // MOJO_EDK_SYSTEM_DATA_PIPE_IMPL_H_ |
OLD | NEW |