mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-14 22:16:46 +00:00
Support timeout of fixed_queue and osi_thread
1. remove fixed_queue_try_dequeue and fixed_queue_try_enqueue, 2. add timeout parameter for fixed_queue_enqueue and fixed_queue_dequeue 3. replace where call fixed_queue_try_dequeue/enqueue to fixed_queue_dequeue/enqueue(..., timeout = 0) 4. replace where call fixed queue_enqueue/dequeue to fixed_queue_enqueue/dequeue( ..., timeout = FIXED_QUEUE_MAX_TIMEOUT) 5. modify the blocking_type of osi_thread_post to timeout.
This commit is contained in:
@@ -210,13 +210,13 @@ void port_release_port (tPORT *p_port)
|
||||
|
||||
osi_mutex_global_lock();
|
||||
RFCOMM_TRACE_DEBUG("port_release_port, p_port:%p", p_port);
|
||||
while ((p_buf = (BT_HDR *)fixed_queue_try_dequeue(p_port->rx.queue)) != NULL) {
|
||||
while ((p_buf = (BT_HDR *)fixed_queue_dequeue(p_port->rx.queue, 0)) != NULL) {
|
||||
osi_free (p_buf);
|
||||
}
|
||||
|
||||
p_port->rx.queue_size = 0;
|
||||
|
||||
while ((p_buf = (BT_HDR *)fixed_queue_try_dequeue(p_port->tx.queue)) != NULL) {
|
||||
while ((p_buf = (BT_HDR *)fixed_queue_dequeue(p_port->tx.queue, 0)) != NULL) {
|
||||
osi_free (p_buf);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user