chromium/v8/src/profiler/circular-queue.h

// Copyright 2010 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef V8_PROFILER_CIRCULAR_QUEUE_H_
#define V8_PROFILER_CIRCULAR_QUEUE_H_

#include "src/base/atomicops.h"
#include "src/common/globals.h"

namespace v8 {
namespace internal {

// Lock-free cache-friendly sampling circular queue for large
// records. Intended for fast transfer of large records between a
// single producer and a single consumer. If the queue is full,
// StartEnqueue will return nullptr. The queue is designed with
// a goal in mind to evade cache lines thrashing by preventing
// simultaneous reads and writes to adjanced memory locations.
template<typename T, unsigned Length>
class SamplingCircularQueue {};


}  // namespace internal
}  // namespace v8

#endif  // V8_PROFILER_CIRCULAR_QUEUE_H_