Lines Matching refs:Q
94 FREE_QUEUE_T* Q; in gki_alloc_free_queue() local
97 Q = &p_cb->freeq[p_cb->pool_list[id]]; in gki_alloc_free_queue()
99 if (Q->p_first == nullptr) { in gki_alloc_free_queue()
100 void* p_mem = GKI_os_malloc((Q->size + BUFFER_PADDING_SIZE) * Q->total); in gki_alloc_free_queue()
103 gki_init_free_queue(id, Q->size, Q->total, p_mem); in gki_alloc_free_queue()
258 FREE_QUEUE_T* Q; in GKI_getbuf() local
301 Q = &gki_cb.com.freeq[p_hdr->q_id]; in GKI_getbuf()
302 if (++Q->cur_cnt > Q->max_cnt) Q->max_cnt = Q->cur_cnt; in GKI_getbuf()
306 "%s %p %d:%d", __func__, ((uint8_t*)p_hdr + BUFFER_HDR_SIZE), Q->cur_cnt, in GKI_getbuf()
307 Q->max_cnt); in GKI_getbuf()
338 Q = &p_cb->freeq[p_cb->pool_list[i]]; in GKI_getbuf()
339 if (Q->cur_cnt < Q->total) { in GKI_getbuf()
340 if (Q->p_first == nullptr && gki_alloc_free_queue(i) != true) { in GKI_getbuf()
346 if (Q->p_first == nullptr) { in GKI_getbuf()
353 p_hdr = Q->p_first; in GKI_getbuf()
354 Q->p_first = p_hdr->p_next; in GKI_getbuf()
356 if (!Q->p_first) Q->p_last = nullptr; in GKI_getbuf()
358 if (++Q->cur_cnt > Q->max_cnt) Q->max_cnt = Q->cur_cnt; in GKI_getbuf()
422 FREE_QUEUE_T* Q; in GKI_getpoolbuf()
431 Q = &p_cb->freeq[pool_id]; in GKI_getpoolbuf()
432 if (Q->cur_cnt < Q->total) { in GKI_getpoolbuf()
433 if (Q->p_first == nullptr && gki_alloc_free_queue(pool_id) != true) return nullptr; in GKI_getpoolbuf()
435 if (Q->p_first == nullptr) { in GKI_getpoolbuf()
441 p_hdr = Q->p_first; in GKI_getpoolbuf()
442 Q->p_first = p_hdr->p_next; in GKI_getpoolbuf()
444 if (!Q->p_first) Q->p_last = nullptr; in GKI_getpoolbuf()
446 if (++Q->cur_cnt > Q->max_cnt) Q->max_cnt = Q->cur_cnt; in GKI_getpoolbuf()
481 FREE_QUEUE_T* Q; in GKI_freebuf() local
504 Q = &gki_cb.com.freeq[p_hdr->q_id]; in GKI_freebuf()
505 if (Q->cur_cnt > 0) Q->cur_cnt--; in GKI_freebuf()
515 Q = &gki_cb.com.freeq[p_hdr->q_id]; in GKI_freebuf()
516 if (Q->p_last) in GKI_freebuf()
517 Q->p_last->p_next = p_hdr; in GKI_freebuf()
519 Q->p_first = p_hdr; in GKI_freebuf()
521 Q->p_last = p_hdr; in GKI_freebuf()
525 if (Q->cur_cnt > 0) Q->cur_cnt--; in GKI_freebuf()
1102 FREE_QUEUE_T* Q; in GKI_poolfreecount() local
1106 Q = &gki_cb.com.freeq[pool_id]; in GKI_poolfreecount()
1108 return ((uint16_t)(Q->total - Q->cur_cnt)); in GKI_poolfreecount()
1261 FREE_QUEUE_T* Q; in GKI_delete_pool() local
1268 Q = &p_cb->freeq[pool_id]; in GKI_delete_pool()
1270 if (!Q->cur_cnt) { in GKI_delete_pool()
1271 Q->size = 0; in GKI_delete_pool()
1272 Q->total = 0; in GKI_delete_pool()
1273 Q->cur_cnt = 0; in GKI_delete_pool()
1274 Q->max_cnt = 0; in GKI_delete_pool()
1275 Q->p_first = nullptr; in GKI_delete_pool()
1276 Q->p_last = nullptr; in GKI_delete_pool()
1353 FREE_QUEUE_T* Q; in GKI_poolutilization() local
1357 Q = &gki_cb.com.freeq[pool_id]; in GKI_poolutilization()
1359 if (Q->total == 0) return (100); in GKI_poolutilization()
1361 return ((Q->cur_cnt * 100) / Q->total); in GKI_poolutilization()