OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <iostream> | 10 #include <ostream> |
11 #include <utility> | 11 #include <utility> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/timer.h" | 15 #include "base/timer.h" |
16 | 16 |
17 // Design notes: An efficient implementation of ready list has the following | 17 // Design notes: An efficient implementation of ready list has the following |
18 // desirable properties: | 18 // desirable properties: |
19 // | 19 // |
20 // A. O(1) insertion into/removal from the list in any location. | 20 // A. O(1) insertion into/removal from the list in any location. |
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 // If the alarm was registered, unregister it. | 823 // If the alarm was registered, unregister it. |
824 void EpollAlarm::UnregisterIfRegistered() { | 824 void EpollAlarm::UnregisterIfRegistered() { |
825 if (!registered_) { | 825 if (!registered_) { |
826 return; | 826 return; |
827 } | 827 } |
828 eps_->UnregisterAlarm(token_); | 828 eps_->UnregisterAlarm(token_); |
829 } | 829 } |
830 | 830 |
831 } // namespace net | 831 } // namespace net |
832 | 832 |
OLD | NEW |