Lines Matching refs:read_head
40 size_t read_head = read_head_.load(std::memory_order_relaxed); in GetFreeSize() local
41 size_t write_tail = read_head > 0 ? read_head - 1 : buffer_size_ - 1; in GetFreeSize()
50 size_t read_head = read_head_.load(std::memory_order_acquire); in AllocWriteSpace() local
51 size_t write_tail = read_head > 0 ? read_head - 1 : buffer_size_ - 1; in AllocWriteSpace()
81 size_t read_head = read_head_.load(std::memory_order_relaxed); in GetCurrentRecord() local
82 if (read_head == write_head) { in GetCurrentRecord()
86 if (read_head > write_head) { in GetCurrentRecord()
87 if (buffer_size_ - read_head < sizeof(header) || in GetCurrentRecord()
88 (memcpy(&header, buffer_.get() + read_head, sizeof(header)) && header.size == 0)) { in GetCurrentRecord()
90 cur_read_record_size_ += buffer_size_ - read_head; in GetCurrentRecord()
91 read_head = 0; in GetCurrentRecord()
95 memcpy(&header, buffer_.get() + read_head, sizeof(header)); in GetCurrentRecord()
98 return buffer_.get() + read_head; in GetCurrentRecord()
102 size_t read_head = read_head_.load(std::memory_order_relaxed); in MoveToNextRecord() local
103 read_head = (read_head + cur_read_record_size_) % buffer_size_; in MoveToNextRecord()
104 read_head_.store(read_head, std::memory_order_release); in MoveToNextRecord()