Home
last modified time | relevance | path

Searched refs:write_position_ (Results 1 – 2 of 2) sorted by relevance

/system/keymaster/android_keymaster/
Dserializable.cpp88 write_position_ -= read_position_; in reserve()
101 write_position_ = 0; in Reinitialize()
115 write_position_ = buffer_size_; in Reinitialize()
120 assert(buffer_size_ >= write_position_); in available_write()
121 return buffer_size_ - write_position_; in available_write()
125 assert(buffer_size_ >= write_position_); in available_read()
126 assert(write_position_ >= read_position_); in available_read()
127 return write_position_ - read_position_; in available_read()
133 memcpy(buffer_.get() + write_position_, src, write_length); in write()
134 write_position_ += write_length; in write()
[all …]
/system/keymaster/include/keymaster/
Dserializable.h207 Buffer() : buffer_(nullptr), buffer_size_(0), read_position_(0), write_position_(0) {} in Buffer()
235 if (static_cast<size_t>(read_position_ + distance) <= write_position_) { in advance_read()
241 uint8_t* peek_write() { return buffer_.get() + write_position_; } in peek_write()
243 if (static_cast<size_t>(write_position_ + distance) <= buffer_size_) { in advance_write()
244 write_position_ += distance; in advance_write()
262 size_t write_position_; variable