Lines Matching refs:p_cb
54 tGKI_COM_CB *p_cb = &gki_cb.com; in gki_init_free_queue() local
63 p_cb->pool_start[id] = (UINT8 *)p_mem; in gki_init_free_queue()
64 p_cb->pool_end[id] = (UINT8 *)p_mem + (act_size * total); in gki_init_free_queue()
67 p_cb->pool_size[id] = act_size; in gki_init_free_queue()
69 p_cb->freeq[id].size = (UINT16) tempsize; in gki_init_free_queue()
70 p_cb->freeq[id].total = total; in gki_init_free_queue()
71 p_cb->freeq[id].cur_cnt = 0; in gki_init_free_queue()
72 p_cb->freeq[id].max_cnt = 0; in gki_init_free_queue()
82 p_cb->freeq[id].p_first = hdr; in gki_init_free_queue()
95 p_cb->freeq[id].p_last = hdr1; in gki_init_free_queue()
104 tGKI_COM_CB *p_cb = &gki_cb.com; in gki_alloc_free_queue() local
109 Q = &p_cb->freeq[p_cb->pool_list[id]]; in gki_alloc_free_queue()
148 tGKI_COM_CB *p_cb = &gki_cb.com; in gki_buffer_init() local
155 p_cb->OSTaskQFirst[tt][mb] = NULL; in gki_buffer_init()
156 p_cb->OSTaskQLast [tt][mb] = NULL; in gki_buffer_init()
162 p_cb->pool_start[tt] = NULL; in gki_buffer_init()
163 p_cb->pool_end[tt] = NULL; in gki_buffer_init()
164 p_cb->pool_size[tt] = 0; in gki_buffer_init()
166 p_cb->freeq[tt].p_first = 0; in gki_buffer_init()
167 p_cb->freeq[tt].p_last = 0; in gki_buffer_init()
168 p_cb->freeq[tt].size = 0; in gki_buffer_init()
169 p_cb->freeq[tt].total = 0; in gki_buffer_init()
170 p_cb->freeq[tt].cur_cnt = 0; in gki_buffer_init()
171 p_cb->freeq[tt].max_cnt = 0; in gki_buffer_init()
175 p_cb->pool_access_mask = GKI_DEF_BUFPOOL_PERM_MASK; in gki_buffer_init()
180 p_cb->bufpool0 = (UINT8 *)GKI_os_malloc ((GKI_BUF0_SIZE + BUFFER_PADDING_SIZE) * GKI_BUF0_MAX); in gki_buffer_init()
184 p_cb->bufpool1 = (UINT8 *)GKI_os_malloc ((GKI_BUF1_SIZE + BUFFER_PADDING_SIZE) * GKI_BUF1_MAX); in gki_buffer_init()
188 p_cb->bufpool2 = (UINT8 *)GKI_os_malloc ((GKI_BUF2_SIZE + BUFFER_PADDING_SIZE) * GKI_BUF2_MAX); in gki_buffer_init()
192 p_cb->bufpool3 = (UINT8 *)GKI_os_malloc ((GKI_BUF3_SIZE + BUFFER_PADDING_SIZE) * GKI_BUF3_MAX); in gki_buffer_init()
196 p_cb->bufpool4 = (UINT8 *)GKI_os_malloc ((GKI_BUF4_SIZE + BUFFER_PADDING_SIZE) * GKI_BUF4_MAX); in gki_buffer_init()
200 p_cb->bufpool5 = (UINT8 *)GKI_os_malloc ((GKI_BUF5_SIZE + BUFFER_PADDING_SIZE) * GKI_BUF5_MAX); in gki_buffer_init()
204 p_cb->bufpool6 = (UINT8 *)GKI_os_malloc ((GKI_BUF6_SIZE + BUFFER_PADDING_SIZE) * GKI_BUF6_MAX); in gki_buffer_init()
208 p_cb->bufpool7 = (UINT8 *)GKI_os_malloc ((GKI_BUF7_SIZE + BUFFER_PADDING_SIZE) * GKI_BUF7_MAX); in gki_buffer_init()
212 p_cb->bufpool8 = (UINT8 *)GKI_os_malloc ((GKI_BUF8_SIZE + BUFFER_PADDING_SIZE) * GKI_BUF8_MAX); in gki_buffer_init()
216 p_cb->bufpool9 = (UINT8 *)GKI_os_malloc ((GKI_BUF9_SIZE + BUFFER_PADDING_SIZE) * GKI_BUF9_MAX); in gki_buffer_init()
220 … p_cb->bufpool10 = (UINT8 *)GKI_os_malloc ((GKI_BUF10_SIZE + BUFFER_PADDING_SIZE) * GKI_BUF10_MAX); in gki_buffer_init()
224 … p_cb->bufpool11 = (UINT8 *)GKI_os_malloc ((GKI_BUF11_SIZE + BUFFER_PADDING_SIZE) * GKI_BUF11_MAX); in gki_buffer_init()
228 … p_cb->bufpool12 = (UINT8 *)GKI_os_malloc ((GKI_BUF12_SIZE + BUFFER_PADDING_SIZE) * GKI_BUF12_MAX); in gki_buffer_init()
232 … p_cb->bufpool13 = (UINT8 *)GKI_os_malloc ((GKI_BUF13_SIZE + BUFFER_PADDING_SIZE) * GKI_BUF13_MAX); in gki_buffer_init()
236 … p_cb->bufpool14 = (UINT8 *)GKI_os_malloc ((GKI_BUF14_SIZE + BUFFER_PADDING_SIZE) * GKI_BUF14_MAX); in gki_buffer_init()
240 … p_cb->bufpool15 = (UINT8 *)GKI_os_malloc ((GKI_BUF15_SIZE + BUFFER_PADDING_SIZE) * GKI_BUF15_MAX); in gki_buffer_init()
247 gki_init_free_queue(0, GKI_BUF0_SIZE, GKI_BUF0_MAX, p_cb->bufpool0); in gki_buffer_init()
251 gki_init_free_queue(1, GKI_BUF1_SIZE, GKI_BUF1_MAX, p_cb->bufpool1); in gki_buffer_init()
255 gki_init_free_queue(2, GKI_BUF2_SIZE, GKI_BUF2_MAX, p_cb->bufpool2); in gki_buffer_init()
259 gki_init_free_queue(3, GKI_BUF3_SIZE, GKI_BUF3_MAX, p_cb->bufpool3); in gki_buffer_init()
263 gki_init_free_queue(4, GKI_BUF4_SIZE, GKI_BUF4_MAX, p_cb->bufpool4); in gki_buffer_init()
267 gki_init_free_queue(5, GKI_BUF5_SIZE, GKI_BUF5_MAX, p_cb->bufpool5); in gki_buffer_init()
271 gki_init_free_queue(6, GKI_BUF6_SIZE, GKI_BUF6_MAX, p_cb->bufpool6); in gki_buffer_init()
275 gki_init_free_queue(7, GKI_BUF7_SIZE, GKI_BUF7_MAX, p_cb->bufpool7); in gki_buffer_init()
279 gki_init_free_queue(8, GKI_BUF8_SIZE, GKI_BUF8_MAX, p_cb->bufpool8); in gki_buffer_init()
283 gki_init_free_queue(9, GKI_BUF9_SIZE, GKI_BUF9_MAX, p_cb->bufpool9); in gki_buffer_init()
287 gki_init_free_queue(10, GKI_BUF10_SIZE, GKI_BUF10_MAX, p_cb->bufpool10); in gki_buffer_init()
291 gki_init_free_queue(11, GKI_BUF11_SIZE, GKI_BUF11_MAX, p_cb->bufpool11); in gki_buffer_init()
295 gki_init_free_queue(12, GKI_BUF12_SIZE, GKI_BUF12_MAX, p_cb->bufpool12); in gki_buffer_init()
299 gki_init_free_queue(13, GKI_BUF13_SIZE, GKI_BUF13_MAX, p_cb->bufpool13); in gki_buffer_init()
303 gki_init_free_queue(14, GKI_BUF14_SIZE, GKI_BUF14_MAX, p_cb->bufpool14); in gki_buffer_init()
307 gki_init_free_queue(15, GKI_BUF15_SIZE, GKI_BUF15_MAX, p_cb->bufpool15); in gki_buffer_init()
313 p_cb->pool_list[i] = i; in gki_buffer_init()
316 p_cb->curr_total_no_of_pools = GKI_NUM_FIXED_BUF_POOLS; in gki_buffer_init()
365 tGKI_COM_CB *p_cb = &gki_cb.com; in GKI_getbuf_debug() local
380 for (i=0; i < p_cb->curr_total_no_of_pools; i++) in GKI_getbuf_debug()
382 if ( size <= p_cb->freeq[p_cb->pool_list[i]].size ) in GKI_getbuf_debug()
386 if(i == p_cb->curr_total_no_of_pools) in GKI_getbuf_debug()
397 for ( ; i < p_cb->curr_total_no_of_pools; i++) in GKI_getbuf_debug()
400 if (((UINT16)1 << p_cb->pool_list[i]) & p_cb->pool_access_mask) in GKI_getbuf_debug()
403 Q = &p_cb->freeq[p_cb->pool_list[i]]; in GKI_getbuf_debug()
440 … %d used) %d", (UINT8*)p_hdr + BUFFER_HDR_SIZE, p_hdr, Q->cur_cnt, Q->total, p_cb->freeq[i].total); in GKI_getbuf_debug()
455 p_cb = &gki_cb.com; in GKI_getbuf_debug()
457 LOGD("Dumping total of %d buffer pools", p_cb->curr_total_no_of_pools); in GKI_getbuf_debug()
459 for (i=0 ; i < p_cb->curr_total_no_of_pools; i++) in GKI_getbuf_debug()
461 p_hdr = (BUFFER_HDR_T *)p_cb->pool_start[i]; in GKI_getbuf_debug()
463 LOGD("pool %d has a total of %d buffers (start=%p)", i, p_cb->freeq[i].total, p_hdr); in GKI_getbuf_debug()
465 for (x=0; p_hdr && x < p_cb->freeq[i].total; x++) in GKI_getbuf_debug()
472 p_hdr = (BUFFER_HDR_T *)((UINT8 *)p_hdr + p_cb->pool_size[i]); in GKI_getbuf_debug()
509 tGKI_COM_CB *p_cb = &gki_cb.com; in GKI_getpoolbuf_debug() local
520 Q = &p_cb->freeq[pool_id]; in GKI_getpoolbuf_debug()
554 … used) %d", (UINT8*)p_hdr + BUFFER_HDR_SIZE, p_hdr, Q->cur_cnt, Q->total, p_cb->freeq[pool_id].tot… in GKI_getpoolbuf_debug()
568 return (GKI_getbuf_debug(p_cb->freeq[pool_id].size, _function_, _line_)); in GKI_getpoolbuf_debug()
571 return (GKI_getbuf(p_cb->freeq[pool_id].size)); in GKI_getpoolbuf_debug()
712 tGKI_COM_CB *p_cb = &gki_cb.com; in GKI_send_msg() local
715 …if ((task_id >= GKI_MAX_TASKS) || (mbox >= NUM_TASK_MBOX) || (p_cb->OSRdyTbl[task_id] == TASK_DEAD… in GKI_send_msg()
740 if (p_cb->OSTaskQFirst[task_id][mbox]) in GKI_send_msg()
741 p_cb->OSTaskQLast[task_id][mbox]->p_next = p_hdr; in GKI_send_msg()
743 p_cb->OSTaskQFirst[task_id][mbox] = p_hdr; in GKI_send_msg()
745 p_cb->OSTaskQLast[task_id][mbox] = p_hdr; in GKI_send_msg()
1103 tGKI_COM_CB *p_cb = &gki_cb.com; in GKI_find_buf_start() local
1108 if ((p_ua > p_cb->pool_start[xx]) && (p_ua < p_cb->pool_end[xx])) in GKI_find_buf_start()
1110 yy = (UINT32)(p_ua - p_cb->pool_start[xx]); in GKI_find_buf_start()
1112 size = p_cb->pool_size[xx]; in GKI_find_buf_start()
1116 return ((void *) (p_cb->pool_start[xx] + yy + sizeof(BUFFER_HDR_T)) ); in GKI_find_buf_start()
1148 tGKI_COM_CB *p_cb = &gki_cb.com; in GKI_set_pool_permission() local
1153 p_cb->pool_access_mask = (UINT16)(p_cb->pool_access_mask | (1 << pool_id)); in GKI_set_pool_permission()
1156 p_cb->pool_access_mask = (UINT16)(p_cb->pool_access_mask & ~(1 << pool_id)); in GKI_set_pool_permission()
1178 tGKI_COM_CB *p_cb = &gki_cb.com; in gki_add_to_pool_list() local
1181 for(i=0; i < p_cb->curr_total_no_of_pools; i++) in gki_add_to_pool_list()
1184 if(p_cb->freeq[pool_id].size <= p_cb->freeq[ p_cb->pool_list[i] ].size) in gki_add_to_pool_list()
1189 for(j = p_cb->curr_total_no_of_pools; j > i; j--) in gki_add_to_pool_list()
1191 p_cb->pool_list[j] = p_cb->pool_list[j-1]; in gki_add_to_pool_list()
1194 p_cb->pool_list[i] = pool_id; in gki_add_to_pool_list()
1210 tGKI_COM_CB *p_cb = &gki_cb.com; in gki_remove_from_pool_list() local
1213 for(i=0; i < p_cb->curr_total_no_of_pools; i++) in gki_remove_from_pool_list()
1215 if(pool_id == p_cb->pool_list[i]) in gki_remove_from_pool_list()
1219 while (i < (p_cb->curr_total_no_of_pools - 1)) in gki_remove_from_pool_list()
1221 p_cb->pool_list[i] = p_cb->pool_list[i+1]; in gki_remove_from_pool_list()
1351 tGKI_COM_CB *p_cb = &gki_cb.com; in GKI_isend_msg() local
1354 …if ((task_id >= GKI_MAX_TASKS) || (mbox >= NUM_TASK_MBOX) || (p_cb->OSRdyTbl[task_id] == TASK_DEAD… in GKI_isend_msg()
1385 if (p_cb->OSTaskQFirst[task_id][mbox]) in GKI_isend_msg()
1386 p_cb->OSTaskQLast[task_id][mbox]->p_next = p_hdr; in GKI_isend_msg()
1388 p_cb->OSTaskQFirst[task_id][mbox] = p_hdr; in GKI_isend_msg()
1390 p_cb->OSTaskQLast[task_id][mbox] = p_hdr; in GKI_isend_msg()
1424 tGKI_COM_CB *p_cb = &gki_cb.com; in GKI_create_pool() local
1433 if (!p_cb->pool_start[xx]) in GKI_create_pool()
1454 p_cb->curr_total_no_of_pools++; in GKI_create_pool()
1478 tGKI_COM_CB *p_cb = &gki_cb.com; in GKI_delete_pool() local
1480 if ((pool_id >= GKI_NUM_TOTAL_BUF_POOLS) || (!p_cb->pool_start[pool_id])) in GKI_delete_pool()
1484 Q = &p_cb->freeq[pool_id]; in GKI_delete_pool()
1495 GKI_os_free (p_cb->pool_start[pool_id]); in GKI_delete_pool()
1497 p_cb->pool_start[pool_id] = NULL; in GKI_delete_pool()
1498 p_cb->pool_end[pool_id] = NULL; in GKI_delete_pool()
1499 p_cb->pool_size[pool_id] = 0; in GKI_delete_pool()
1502 p_cb->curr_total_no_of_pools--; in GKI_delete_pool()