OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 BASE_ATOMIC_SEQUENCE_NUM_H_ | 5 #ifndef BASE_ATOMIC_SEQUENCE_NUM_H_ |
6 #define BASE_ATOMIC_SEQUENCE_NUM_H_ | 6 #define BASE_ATOMIC_SEQUENCE_NUM_H_ |
7 | 7 |
8 #include "base/atomicops.h" | 8 #include "base/atomicops.h" |
9 #include "base/basictypes.h" | 9 #include "base/macros.h" |
10 | 10 |
11 namespace base { | 11 namespace base { |
12 | 12 |
13 class AtomicSequenceNumber; | 13 class AtomicSequenceNumber; |
14 | 14 |
15 // Static (POD) AtomicSequenceNumber that MUST be used in global scope (or | 15 // Static (POD) AtomicSequenceNumber that MUST be used in global scope (or |
16 // non-function scope) ONLY. This implementation does not generate any static | 16 // non-function scope) ONLY. This implementation does not generate any static |
17 // initializer. Note that it does not implement any constructor which means | 17 // initializer. Note that it does not implement any constructor which means |
18 // that its fields are not initialized except when it is stored in the global | 18 // that its fields are not initialized except when it is stored in the global |
19 // data section (.data in ELF). If you want to allocate an atomic sequence | 19 // data section (.data in ELF). If you want to allocate an atomic sequence |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 51 } |
52 | 52 |
53 private: | 53 private: |
54 StaticAtomicSequenceNumber seq_; | 54 StaticAtomicSequenceNumber seq_; |
55 DISALLOW_COPY_AND_ASSIGN(AtomicSequenceNumber); | 55 DISALLOW_COPY_AND_ASSIGN(AtomicSequenceNumber); |
56 }; | 56 }; |
57 | 57 |
58 } // namespace base | 58 } // namespace base |
59 | 59 |
60 #endif // BASE_ATOMIC_SEQUENCE_NUM_H_ | 60 #endif // BASE_ATOMIC_SEQUENCE_NUM_H_ |
OLD | NEW |