OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project 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 V8_CIRCULAR_QUEUE_H_ | 5 #ifndef V8_CIRCULAR_QUEUE_H_ |
6 #define V8_CIRCULAR_QUEUE_H_ | 6 #define V8_CIRCULAR_QUEUE_H_ |
7 | 7 |
8 #include "atomicops.h" | 8 #include "src/atomicops.h" |
9 #include "globals.h" | 9 #include "src/globals.h" |
10 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 | 13 |
14 | 14 |
15 // Lock-free cache-friendly sampling circular queue for large | 15 // Lock-free cache-friendly sampling circular queue for large |
16 // records. Intended for fast transfer of large records between a | 16 // records. Intended for fast transfer of large records between a |
17 // single producer and a single consumer. If the queue is full, | 17 // single producer and a single consumer. If the queue is full, |
18 // StartEnqueue will return NULL. The queue is designed with | 18 // StartEnqueue will return NULL. The queue is designed with |
19 // a goal in mind to evade cache lines thrashing by preventing | 19 // a goal in mind to evade cache lines thrashing by preventing |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 V8_ALIGNED(PROCESSOR_CACHE_LINE_SIZE) Entry* enqueue_pos_; | 59 V8_ALIGNED(PROCESSOR_CACHE_LINE_SIZE) Entry* enqueue_pos_; |
60 V8_ALIGNED(PROCESSOR_CACHE_LINE_SIZE) Entry* dequeue_pos_; | 60 V8_ALIGNED(PROCESSOR_CACHE_LINE_SIZE) Entry* dequeue_pos_; |
61 | 61 |
62 DISALLOW_COPY_AND_ASSIGN(SamplingCircularQueue); | 62 DISALLOW_COPY_AND_ASSIGN(SamplingCircularQueue); |
63 }; | 63 }; |
64 | 64 |
65 | 65 |
66 } } // namespace v8::internal | 66 } } // namespace v8::internal |
67 | 67 |
68 #endif // V8_CIRCULAR_QUEUE_H_ | 68 #endif // V8_CIRCULAR_QUEUE_H_ |
OLD | NEW |