pdu_queue: add reset method to empty queue

master
Andre Puschmann 4 years ago
parent 64fca23eb3
commit 6773f6d02f

@ -51,6 +51,8 @@ public:
bool process_pdus(); bool process_pdus();
void reset();
private: private:
const static int DEFAULT_POOL_SIZE = 64; // Number of PDU buffers in total const static int DEFAULT_POOL_SIZE = 64; // Number of PDU buffers in total
const static int MAX_PDU_LEN = 150 * 1024 / 8; // ~ 150 Mbps const static int MAX_PDU_LEN = 150 * 1024 / 8; // ~ 150 Mbps

@ -95,4 +95,12 @@ bool pdu_queue::process_pdus()
return have_data; return have_data;
} }
void pdu_queue::reset()
{
pdu_t* pdu;
while (pdu_q.try_pop(&pdu)) {
// nop
}
}
} // namespace srslte } // namespace srslte

Loading…
Cancel
Save