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

Side by Side Diff: base/waitable_event_posix.cc

Issue 3452030: FBTF: Moves code to the headers. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 2 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
« no previous file with comments | « base/waitable_event.h ('k') | chrome/common/message_router.h » ('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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/waitable_event.h" 5 #include "base/waitable_event.h"
6 6
7 #include "base/condition_variable.h" 7 #include "base/condition_variable.h"
8 #include "base/lock.h" 8 #include "base/lock.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 10
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 328
329 return r; 329 return r;
330 } 330 }
331 331
332 // ----------------------------------------------------------------------------- 332 // -----------------------------------------------------------------------------
333 333
334 334
335 // ----------------------------------------------------------------------------- 335 // -----------------------------------------------------------------------------
336 // Private functions... 336 // Private functions...
337 337
338 WaitableEvent::WaitableEventKernel::WaitableEventKernel(bool manual_reset,
339 bool initially_signaled)
340 : manual_reset_(manual_reset),
341 signaled_(initially_signaled) {
342 }
343
344 WaitableEvent::WaitableEventKernel::~WaitableEventKernel() {
345 }
346
338 // ----------------------------------------------------------------------------- 347 // -----------------------------------------------------------------------------
339 // Wake all waiting waiters. Called with lock held. 348 // Wake all waiting waiters. Called with lock held.
340 // ----------------------------------------------------------------------------- 349 // -----------------------------------------------------------------------------
341 bool WaitableEvent::SignalAll() { 350 bool WaitableEvent::SignalAll() {
342 bool signaled_at_least_one = false; 351 bool signaled_at_least_one = false;
343 352
344 for (std::list<Waiter*>::iterator 353 for (std::list<Waiter*>::iterator
345 i = kernel_->waiters_.begin(); i != kernel_->waiters_.end(); ++i) { 354 i = kernel_->waiters_.begin(); i != kernel_->waiters_.end(); ++i) {
346 if ((*i)->Fire(this)) 355 if ((*i)->Fire(this))
347 signaled_at_least_one = true; 356 signaled_at_least_one = true;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 return true; 395 return true;
387 } 396 }
388 } 397 }
389 398
390 return false; 399 return false;
391 } 400 }
392 401
393 // ----------------------------------------------------------------------------- 402 // -----------------------------------------------------------------------------
394 403
395 } // namespace base 404 } // namespace base
OLDNEW
« no previous file with comments | « base/waitable_event.h ('k') | chrome/common/message_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698