htc: implement remainder of Mux/Tasks

This commit is contained in:
Michael Scire
2021-02-09 19:51:52 -08:00
committed by SciresM
parent 42cf3f50d7
commit b925344c3b
13 changed files with 291 additions and 24 deletions

View File

@@ -47,6 +47,16 @@ namespace ams::htclow::mux {
m_can_discard = false;
}
Result RingBuffer::Read(void *dst, size_t size) {
/* Copy the data. */
R_TRY(this->Copy(dst, size));
/* Discard. */
R_TRY(this->Discard(size));
return ResultSuccess();
}
Result RingBuffer::Write(const void *data, size_t size) {
/* Validate pre-conditions. */
AMS_ASSERT(!m_is_read_only);