htc: implement remaining worker thread send logic (for channel mux)

This commit is contained in:
Michael Scire
2021-02-09 03:21:45 -08:00
committed by SciresM
parent df3d62df84
commit 4ed665bcd3
14 changed files with 346 additions and 13 deletions

View File

@@ -43,7 +43,9 @@ namespace ams::htclow::mux {
RingBuffer m_receive_buffer;
s16 m_version;
ChannelConfig m_config;
/* TODO: tracking variables. */
u64 m_total_send_size;
u64 m_next_max_data;
u64 m_cur_max_data;
u64 m_offset;
std::optional<u64> m_share;
os::Event m_state_change_event;
@@ -55,6 +57,10 @@ namespace ams::htclow::mux {
Result ProcessReceivePacket(const PacketHeader &header, const void *body, size_t body_size);
bool QuerySendPacket(PacketHeader *header, PacketBody *body, int *out_body_size);
void RemovePacket(const PacketHeader &header);
void UpdateState();
private:
void ShutdownForce();