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:
Tian Hao
2019-04-18 11:57:28 +08:00
committed by baohongde
parent 9863565a6f
commit 2ad65bb434
41 changed files with 207 additions and 221 deletions

View File

@@ -492,12 +492,12 @@ void rfc_check_send_cmd(tRFC_MCB *p_mcb, BT_HDR *p_buf)
__func__, p_mcb, p_mcb->lcid,
rfc_find_lcid_mcb(p_mcb->lcid));
}
fixed_queue_enqueue(p_mcb->cmd_q, p_buf);
fixed_queue_enqueue(p_mcb->cmd_q, p_buf, FIXED_QUEUE_MAX_TIMEOUT);
}
/* handle queue if L2CAP not congested */
while (p_mcb->l2cap_congested == FALSE) {
if ((p = (BT_HDR *)fixed_queue_try_dequeue(p_mcb->cmd_q)) == NULL) {
if ((p = (BT_HDR *)fixed_queue_dequeue(p_mcb->cmd_q, 0)) == NULL) {
break;
}