#include "xray_buffer_queue.h"
#include "sanitizer_common/sanitizer_atomic.h"
#include "sanitizer_common/sanitizer_common.h"
#include "sanitizer_common/sanitizer_libc.h"
#if !SANITIZER_FUCHSIA
#include "sanitizer_common/sanitizer_posix.h"
#endif
#include "xray_allocator.h"
#include "xray_defs.h"
#include <memory>
#include <sys/mman.h>
usingnamespace__xray;
namespace {
BufferQueue::ControlBlock *allocControlBlock(size_t Size, size_t Count) { … }
void deallocControlBlock(BufferQueue::ControlBlock *C, size_t Size,
size_t Count) { … }
void decRefCount(BufferQueue::ControlBlock *C, size_t Size, size_t Count) { … }
void incRefCount(BufferQueue::ControlBlock *C) { … }
struct ExtentsPadded { … };
constexpr size_t kExtentsSize = …;
}
BufferQueue::ErrorCode BufferQueue::init(size_t BS, size_t BC) { … }
BufferQueue::BufferQueue(size_t B, size_t N,
bool &Success) XRAY_NEVER_INSTRUMENT
: … { … }
BufferQueue::ErrorCode BufferQueue::getBuffer(Buffer &Buf) { … }
BufferQueue::ErrorCode BufferQueue::releaseBuffer(Buffer &Buf) { … }
BufferQueue::ErrorCode BufferQueue::finalize() { … }
void BufferQueue::cleanupBuffers() { … }
BufferQueue::~BufferQueue() { … }