OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_RENDERER_DEVTOOLS_LOCK_FREE_CIRCULAR_QUEUE_H_ | 5 #ifndef CONTENT_RENDERER_DEVTOOLS_LOCK_FREE_CIRCULAR_QUEUE_H_ |
6 #define CONTENT_RENDERER_DEVTOOLS_LOCK_FREE_CIRCULAR_QUEUE_H_ | 6 #define CONTENT_RENDERER_DEVTOOLS_LOCK_FREE_CIRCULAR_QUEUE_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include "base/atomicops.h" | 10 #include "base/atomicops.h" |
| 11 #include "base/macros.h" |
9 #include "base/memory/aligned_memory.h" | 12 #include "base/memory/aligned_memory.h" |
10 | 13 |
11 #define CACHELINE_ALIGNED ALIGNAS(64) | 14 #define CACHELINE_ALIGNED ALIGNAS(64) |
12 | 15 |
13 namespace content { | 16 namespace content { |
14 | 17 |
15 MSVC_PUSH_DISABLE_WARNING(4324) // structure was padded due to align | 18 MSVC_PUSH_DISABLE_WARNING(4324) // structure was padded due to align |
16 | 19 |
17 // Lock-free cache-friendly sampling circular queue for large | 20 // Lock-free cache-friendly sampling circular queue for large |
18 // records. Intended for fast transfer of large records between a | 21 // records. Intended for fast transfer of large records between a |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 } | 129 } |
127 | 130 |
128 template <typename T, unsigned L> | 131 template <typename T, unsigned L> |
129 void LockFreeCircularQueue<T, L>::operator delete(void* ptr) { | 132 void LockFreeCircularQueue<T, L>::operator delete(void* ptr) { |
130 base::AlignedFree(ptr); | 133 base::AlignedFree(ptr); |
131 } | 134 } |
132 | 135 |
133 } // namespace content | 136 } // namespace content |
134 | 137 |
135 #endif // CONTENT_RENDERER_DEVTOOLS_LOCK_FREE_CIRCULAR_QUEUE_H_ | 138 #endif // CONTENT_RENDERER_DEVTOOLS_LOCK_FREE_CIRCULAR_QUEUE_H_ |
OLD | NEW |