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

Side by Side Diff: base/synchronization/waitable_event_posix.cc

Issue 6410105: run iwyu on base! Base URL: svn://svn.chromium.org/chrome/trunk/src/base
Patch Set: Created 9 years, 10 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/synchronization/waitable_event.h" 5 #include <stdbool.h>
6 #include <stddef.h>
7 #include <algorithm>
8 #include <list>
9 #include <utility>
10 #include <vector>
6 11
12 #include "base/logging.h"
13 #include "base/ref_counted.h"
7 #include "base/synchronization/condition_variable.h" 14 #include "base/synchronization/condition_variable.h"
8 #include "base/synchronization/lock.h" 15 #include "base/synchronization/lock.h"
9 #include "base/message_loop.h" 16 #include "base/synchronization/waitable_event.h"
17 #include "base/time.h"
10 18
11 // ----------------------------------------------------------------------------- 19 // -----------------------------------------------------------------------------
12 // A WaitableEvent on POSIX is implemented as a wait-list. Currently we don't 20 // A WaitableEvent on POSIX is implemented as a wait-list. Currently we don't
13 // support cross-process events (where one process can signal an event which 21 // support cross-process events (where one process can signal an event which
14 // others are waiting on). Because of this, we can avoid having one thread per 22 // others are waiting on). Because of this, we can avoid having one thread per
15 // listener in several cases. 23 // listener in several cases.
16 // 24 //
17 // The WaitableEvent maintains a list of waiters, protected by a lock. Each 25 // The WaitableEvent maintains a list of waiters, protected by a lock. Each
18 // waiter is either an async wait, in which case we have a Task and the 26 // waiter is either an async wait, in which case we have a Task and the
19 // MessageLoop to run it on, or a blocking wait, in which case we have the 27 // MessageLoop to run it on, or a blocking wait, in which case we have the
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 return true; 400 return true;
393 } 401 }
394 } 402 }
395 403
396 return false; 404 return false;
397 } 405 }
398 406
399 // ----------------------------------------------------------------------------- 407 // -----------------------------------------------------------------------------
400 408
401 } // namespace base 409 } // namespace base
OLDNEW
« no previous file with comments | « base/synchronization/lock_impl_posix.cc ('k') | base/synchronization/waitable_event_watcher_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698