Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: mojo/system/data_pipe.h

Issue 333713003: Mojo: Plumb wait flags state through DataPipe::Awake...WaitersForStateChangeNoLock(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wrong change Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | mojo/system/data_pipe.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef MOJO_SYSTEM_DATA_PIPE_H_ 5 #ifndef MOJO_SYSTEM_DATA_PIPE_H_
6 #define MOJO_SYSTEM_DATA_PIPE_H_ 6 #define MOJO_SYSTEM_DATA_PIPE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 bool producer_in_two_phase_write_no_lock() const { 158 bool producer_in_two_phase_write_no_lock() const {
159 lock_.AssertAcquired(); 159 lock_.AssertAcquired();
160 return producer_two_phase_max_num_bytes_written_ > 0; 160 return producer_two_phase_max_num_bytes_written_ > 0;
161 } 161 }
162 bool consumer_in_two_phase_read_no_lock() const { 162 bool consumer_in_two_phase_read_no_lock() const {
163 lock_.AssertAcquired(); 163 lock_.AssertAcquired();
164 return consumer_two_phase_max_num_bytes_read_ > 0; 164 return consumer_two_phase_max_num_bytes_read_ > 0;
165 } 165 }
166 166
167 private: 167 private:
168 void AwakeProducerWaitersForStateChangeNoLock(); 168 void AwakeProducerWaitersForStateChangeNoLock(
169 void AwakeConsumerWaitersForStateChangeNoLock(); 169 const WaitFlagsState& new_producer_state);
170 void AwakeConsumerWaitersForStateChangeNoLock(
171 const WaitFlagsState& new_consumer_state);
170 172
171 bool has_local_producer_no_lock() const { 173 bool has_local_producer_no_lock() const {
172 lock_.AssertAcquired(); 174 lock_.AssertAcquired();
173 return !!producer_waiter_list_; 175 return !!producer_waiter_list_;
174 } 176 }
175 bool has_local_consumer_no_lock() const { 177 bool has_local_consumer_no_lock() const {
176 lock_.AssertAcquired(); 178 lock_.AssertAcquired();
177 return !!consumer_waiter_list_; 179 return !!consumer_waiter_list_;
178 } 180 }
179 181
(...skipping 12 matching lines...) Expand all
192 uint32_t producer_two_phase_max_num_bytes_written_; 194 uint32_t producer_two_phase_max_num_bytes_written_;
193 uint32_t consumer_two_phase_max_num_bytes_read_; 195 uint32_t consumer_two_phase_max_num_bytes_read_;
194 196
195 DISALLOW_COPY_AND_ASSIGN(DataPipe); 197 DISALLOW_COPY_AND_ASSIGN(DataPipe);
196 }; 198 };
197 199
198 } // namespace system 200 } // namespace system
199 } // namespace mojo 201 } // namespace mojo
200 202
201 #endif // MOJO_SYSTEM_DATA_PIPE_H_ 203 #endif // MOJO_SYSTEM_DATA_PIPE_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/system/data_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698