Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "net/tools/flip_server/epoll_server.h" | 5 #include "net/tools/flip_server/epoll_server.h" |
| 6 | 6 |
| 7 #include <stdlib.h> // for abort | 7 #include <stdlib.h> // for abort |
| 8 #include <errno.h> // for errno and strerror_r | 8 #include <errno.h> // for errno and strerror_r |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <ostream> | 10 #include <ostream> |
| 11 #include <unistd.h> // for read, pipe, close and write | |
|
rvargas (doing something else)
2013/04/17 18:08:26
nit: two spaces before comment, start comment with
| |
| 11 #include <utility> | 12 #include <utility> |
| 12 #include <vector> | 13 #include <vector> |
| 13 | 14 |
| 14 #include "base/logging.h" | 15 #include "base/logging.h" |
| 15 #include "base/timer.h" | 16 #include "base/timer.h" |
| 16 | 17 |
| 17 // Design notes: An efficient implementation of ready list has the following | 18 // Design notes: An efficient implementation of ready list has the following |
| 18 // desirable properties: | 19 // desirable properties: |
| 19 // | 20 // |
| 20 // A. O(1) insertion into/removal from the list in any location. | 21 // A. O(1) insertion into/removal from the list in any location. |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 812 // If the alarm was registered, unregister it. | 813 // If the alarm was registered, unregister it. |
| 813 void EpollAlarm::UnregisterIfRegistered() { | 814 void EpollAlarm::UnregisterIfRegistered() { |
| 814 if (!registered_) { | 815 if (!registered_) { |
| 815 return; | 816 return; |
| 816 } | 817 } |
| 817 eps_->UnregisterAlarm(token_); | 818 eps_->UnregisterAlarm(token_); |
| 818 } | 819 } |
| 819 | 820 |
| 820 } // namespace net | 821 } // namespace net |
| 821 | 822 |
| OLD | NEW |