Lines Matching refs:Q
103 FREE_QUEUE_T *Q; in gki_alloc_free_queue() local
109 Q = &p_cb->freeq[p_cb->pool_list[id]]; in gki_alloc_free_queue()
111 if(Q->p_first == 0) in gki_alloc_free_queue()
113 void* p_mem = GKI_os_malloc((Q->size + BUFFER_PADDING_SIZE) * Q->total); in gki_alloc_free_queue()
118 …alloc_free_queue calling gki_init_free_queue, id:%d size:%d, totol:%d\n", id, Q->size, Q->total); in gki_alloc_free_queue()
120 gki_init_free_queue(id, Q->size, Q->total, p_mem); in gki_alloc_free_queue()
122 … ALOGD("\ngki_alloc_free_queue ret OK, id:%d size:%d, totol:%d\n", id, Q->size, Q->total); in gki_alloc_free_queue()
363 FREE_QUEUE_T *Q; in GKI_getbuf_debug() local
403 Q = &p_cb->freeq[p_cb->pool_list[i]]; in GKI_getbuf_debug()
404 if(Q->cur_cnt < Q->total) in GKI_getbuf_debug()
407 if(Q->p_first == 0 && gki_alloc_free_queue(i) != TRUE) in GKI_getbuf_debug()
415 if(Q->p_first == 0) in GKI_getbuf_debug()
423 p_hdr = Q->p_first; in GKI_getbuf_debug()
424 Q->p_first = p_hdr->p_next; in GKI_getbuf_debug()
426 if (!Q->p_first) in GKI_getbuf_debug()
427 Q->p_last = NULL; in GKI_getbuf_debug()
429 if(++Q->cur_cnt > Q->max_cnt) in GKI_getbuf_debug()
430 Q->max_cnt = Q->cur_cnt; in GKI_getbuf_debug()
440 …, %x, %x (%d of %d used) %d", (UINT8*)p_hdr + BUFFER_HDR_SIZE, p_hdr, Q->cur_cnt, Q->total, p_cb->… in GKI_getbuf_debug()
507 FREE_QUEUE_T *Q; in GKI_getpoolbuf_debug() local
520 Q = &p_cb->freeq[pool_id]; in GKI_getpoolbuf_debug()
521 if(Q->cur_cnt < Q->total) in GKI_getpoolbuf_debug()
524 if(Q->p_first == 0 && gki_alloc_free_queue(pool_id) != TRUE) in GKI_getpoolbuf_debug()
528 if(Q->p_first == 0) in GKI_getpoolbuf_debug()
535 p_hdr = Q->p_first; in GKI_getpoolbuf_debug()
536 Q->p_first = p_hdr->p_next; in GKI_getpoolbuf_debug()
538 if (!Q->p_first) in GKI_getpoolbuf_debug()
539 Q->p_last = NULL; in GKI_getpoolbuf_debug()
541 if(++Q->cur_cnt > Q->max_cnt) in GKI_getpoolbuf_debug()
542 Q->max_cnt = Q->cur_cnt; in GKI_getpoolbuf_debug()
554 …, %x, %x (%d of %d used) %d", (UINT8*)p_hdr + BUFFER_HDR_SIZE, p_hdr, Q->cur_cnt, Q->total, p_cb->… in GKI_getpoolbuf_debug()
588 FREE_QUEUE_T *Q; in GKI_freebuf() local
622 Q = &gki_cb.com.freeq[p_hdr->q_id]; in GKI_freebuf()
623 if (Q->p_last) in GKI_freebuf()
624 Q->p_last->p_next = p_hdr; in GKI_freebuf()
626 Q->p_first = p_hdr; in GKI_freebuf()
628 Q->p_last = p_hdr; in GKI_freebuf()
632 if (Q->cur_cnt > 0) in GKI_freebuf()
633 Q->cur_cnt--; in GKI_freebuf()
1242 FREE_QUEUE_T *Q; in GKI_igetpoolbuf() local
1249 Q = &gki_cb.com.freeq[pool_id]; in GKI_igetpoolbuf()
1250 if(Q->cur_cnt < Q->total) in GKI_igetpoolbuf()
1252 p_hdr = Q->p_first; in GKI_igetpoolbuf()
1253 Q->p_first = p_hdr->p_next; in GKI_igetpoolbuf()
1255 if (!Q->p_first) in GKI_igetpoolbuf()
1256 Q->p_last = NULL; in GKI_igetpoolbuf()
1258 if(++Q->cur_cnt > Q->max_cnt) in GKI_igetpoolbuf()
1259 Q->max_cnt = Q->cur_cnt; in GKI_igetpoolbuf()
1307 FREE_QUEUE_T *Q; in GKI_poolfreecount() local
1312 Q = &gki_cb.com.freeq[pool_id]; in GKI_poolfreecount()
1314 return ((UINT16)(Q->total - Q->cur_cnt)); in GKI_poolfreecount()
1477 FREE_QUEUE_T *Q; in GKI_delete_pool() local
1484 Q = &p_cb->freeq[pool_id]; in GKI_delete_pool()
1486 if (!Q->cur_cnt) in GKI_delete_pool()
1488 Q->size = 0; in GKI_delete_pool()
1489 Q->total = 0; in GKI_delete_pool()
1490 Q->cur_cnt = 0; in GKI_delete_pool()
1491 Q->max_cnt = 0; in GKI_delete_pool()
1492 Q->p_first = NULL; in GKI_delete_pool()
1493 Q->p_last = NULL; in GKI_delete_pool()
1547 FREE_QUEUE_T *Q; in GKI_poolutilization() local
1552 Q = &gki_cb.com.freeq[pool_id]; in GKI_poolutilization()
1554 if (Q->total == 0) in GKI_poolutilization()
1557 return ((Q->cur_cnt * 100) / Q->total); in GKI_poolutilization()