Lines Matching refs:p_hdr

364     BUFFER_HDR_T  *p_hdr;  in GKI_getbuf_debug()  local
423 p_hdr = Q->p_first; in GKI_getbuf_debug()
424 Q->p_first = p_hdr->p_next; in GKI_getbuf_debug()
434 p_hdr->task_id = GKI_get_taskid(); in GKI_getbuf_debug()
436 p_hdr->status = BUF_STATUS_UNLINKED; in GKI_getbuf_debug()
437 p_hdr->p_next = NULL; in GKI_getbuf_debug()
438 p_hdr->Type = 0; in GKI_getbuf_debug()
440 …"GKI_getbuf() allocated, %x, %x (%d of %d used) %d", (UINT8*)p_hdr + BUFFER_HDR_SIZE, p_hdr, Q->cu… in GKI_getbuf_debug()
442 strncpy(p_hdr->_function, _function_, _GKI_MAX_FUNCTION_NAME_LEN); in GKI_getbuf_debug()
443 p_hdr->_function[_GKI_MAX_FUNCTION_NAME_LEN] = '\0'; in GKI_getbuf_debug()
444 p_hdr->_line = _line_; in GKI_getbuf_debug()
446 return ((void *) ((UINT8 *)p_hdr + BUFFER_HDR_SIZE)); 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()
467 if (p_hdr->status != BUF_STATUS_FREE) in GKI_getbuf_debug()
469 …atus=%d func:%s(line=%d)", i, x, (UINT8*)p_hdr + BUFFER_HDR_SIZE, p_hdr, p_hdr->status, p_hdr->_fu… in GKI_getbuf_debug()
472 p_hdr = (BUFFER_HDR_T *)((UINT8 *)p_hdr + p_cb->pool_size[i]); in GKI_getbuf_debug()
508 BUFFER_HDR_T *p_hdr; in GKI_getpoolbuf_debug() local
535 p_hdr = Q->p_first; in GKI_getpoolbuf_debug()
536 Q->p_first = p_hdr->p_next; in GKI_getpoolbuf_debug()
547 p_hdr->task_id = GKI_get_taskid(); in GKI_getpoolbuf_debug()
549 p_hdr->status = BUF_STATUS_UNLINKED; in GKI_getpoolbuf_debug()
550 p_hdr->p_next = NULL; in GKI_getpoolbuf_debug()
551 p_hdr->Type = 0; in GKI_getpoolbuf_debug()
554 …_getpoolbuf() allocated, %x, %x (%d of %d used) %d", (UINT8*)p_hdr + BUFFER_HDR_SIZE, p_hdr, Q->cu… in GKI_getpoolbuf_debug()
556 strncpy(p_hdr->_function, _function_, _GKI_MAX_FUNCTION_NAME_LEN); in GKI_getpoolbuf_debug()
557 p_hdr->_function[_GKI_MAX_FUNCTION_NAME_LEN] = '\0'; in GKI_getpoolbuf_debug()
558 p_hdr->_line = _line_; in GKI_getpoolbuf_debug()
560 return ((void *) ((UINT8 *)p_hdr + BUFFER_HDR_SIZE)); in GKI_getpoolbuf_debug()
589 BUFFER_HDR_T *p_hdr; in GKI_freebuf() local
599 p_hdr = (BUFFER_HDR_T *) ((UINT8 *)p_buf - BUFFER_HDR_SIZE); in GKI_freebuf()
602 …LOGD("GKI_freebuf() freeing, %x, %x, func:%s(line=%d)", p_buf, p_hdr, p_hdr->_function, p_hdr->_li… in GKI_freebuf()
605 if (p_hdr->status != BUF_STATUS_UNLINKED) in GKI_freebuf()
611 if (p_hdr->q_id >= GKI_NUM_TOTAL_BUF_POOLS) in GKI_freebuf()
622 Q = &gki_cb.com.freeq[p_hdr->q_id]; 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()
629 p_hdr->p_next = NULL; in GKI_freebuf()
630 p_hdr->status = BUF_STATUS_FREE; in GKI_freebuf()
631 p_hdr->task_id = GKI_INVALID_TASK; in GKI_freebuf()
654 BUFFER_HDR_T *p_hdr; in GKI_get_buf_size() local
656 p_hdr = (BUFFER_HDR_T *)((UINT8 *) p_buf - BUFFER_HDR_SIZE); in GKI_get_buf_size()
658 if ((UINT32)p_hdr & 1) in GKI_get_buf_size()
661 if (p_hdr->q_id < GKI_NUM_TOTAL_BUF_POOLS) in GKI_get_buf_size()
663 return (gki_cb.com.freeq[p_hdr->q_id].size); in GKI_get_buf_size()
711 BUFFER_HDR_T *p_hdr; in GKI_send_msg() local
730 p_hdr = (BUFFER_HDR_T *) ((UINT8 *) msg - BUFFER_HDR_SIZE); in GKI_send_msg()
732 if (p_hdr->status != BUF_STATUS_UNLINKED) 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()
747 p_hdr->p_next = NULL; in GKI_send_msg()
748 p_hdr->status = BUF_STATUS_QUEUED; in GKI_send_msg()
749 p_hdr->task_id = task_id; in GKI_send_msg()
775 BUFFER_HDR_T *p_hdr; in GKI_read_mbox() local
784 p_hdr = gki_cb.com.OSTaskQFirst[task_id][mbox]; in GKI_read_mbox()
785 gki_cb.com.OSTaskQFirst[task_id][mbox] = p_hdr->p_next; in GKI_read_mbox()
787 p_hdr->p_next = NULL; in GKI_read_mbox()
788 p_hdr->status = BUF_STATUS_UNLINKED; in GKI_read_mbox()
790 p_buf = (UINT8 *)p_hdr + BUFFER_HDR_SIZE; in GKI_read_mbox()
814 BUFFER_HDR_T *p_hdr; in GKI_enqueue() local
824 p_hdr = (BUFFER_HDR_T *) ((UINT8 *) p_buf - BUFFER_HDR_SIZE); in GKI_enqueue()
826 if (p_hdr->status != BUF_STATUS_UNLINKED) in GKI_enqueue()
838 p_last_hdr->p_next = p_hdr; in GKI_enqueue()
846 p_hdr->p_next = NULL; in GKI_enqueue()
847 p_hdr->status = BUF_STATUS_QUEUED; in GKI_enqueue()
869 BUFFER_HDR_T *p_hdr; in GKI_enqueue_head() local
879 p_hdr = (BUFFER_HDR_T *) ((UINT8 *) p_buf - BUFFER_HDR_SIZE); in GKI_enqueue_head()
881 if (p_hdr->status != BUF_STATUS_UNLINKED) in GKI_enqueue_head()
891 p_hdr->p_next = (BUFFER_HDR_T *)((UINT8 *)p_q->p_first - BUFFER_HDR_SIZE); in GKI_enqueue_head()
898 p_hdr->p_next = NULL; in GKI_enqueue_head()
902 p_hdr->status = BUF_STATUS_QUEUED; in GKI_enqueue_head()
923 BUFFER_HDR_T *p_hdr; in GKI_dequeue() local
933 p_hdr = (BUFFER_HDR_T *)((UINT8 *)p_q->p_first - BUFFER_HDR_SIZE); in GKI_dequeue()
937 if (p_hdr->p_next) in GKI_dequeue()
938 p_q->p_first = ((UINT8 *)p_hdr->p_next + BUFFER_HDR_SIZE); in GKI_dequeue()
947 p_hdr->p_next = NULL; in GKI_dequeue()
948 p_hdr->status = BUF_STATUS_UNLINKED; in GKI_dequeue()
952 return ((UINT8 *)p_hdr + BUFFER_HDR_SIZE); in GKI_dequeue()
1056 BUFFER_HDR_T *p_hdr; in GKI_getnext() local
1058 p_hdr = (BUFFER_HDR_T *) ((UINT8 *) p_buf - BUFFER_HDR_SIZE); in GKI_getnext()
1060 if (p_hdr->p_next) in GKI_getnext()
1061 return ((UINT8 *)p_hdr->p_next + BUFFER_HDR_SIZE); in GKI_getnext()
1243 BUFFER_HDR_T *p_hdr; in GKI_igetpoolbuf() local
1252 p_hdr = Q->p_first; in GKI_igetpoolbuf()
1253 Q->p_first = p_hdr->p_next; in GKI_igetpoolbuf()
1261 p_hdr->task_id = GKI_get_taskid(); in GKI_igetpoolbuf()
1263 p_hdr->status = BUF_STATUS_UNLINKED; in GKI_igetpoolbuf()
1264 p_hdr->p_next = NULL; in GKI_igetpoolbuf()
1265 p_hdr->Type = 0; in GKI_igetpoolbuf()
1267 return ((void *) ((UINT8 *)p_hdr + BUFFER_HDR_SIZE)); in GKI_igetpoolbuf()
1331 BUFFER_HDR_T *p_hdr = (BUFFER_HDR_T *) ((UINT8 *) p_buf - BUFFER_HDR_SIZE); in GKI_change_buf_owner() local
1333 p_hdr->task_id = task_id; in GKI_change_buf_owner()
1350 BUFFER_HDR_T *p_hdr; in GKI_isend_msg() local
1377 p_hdr = (BUFFER_HDR_T *) ((UINT8 *) msg - BUFFER_HDR_SIZE); in GKI_isend_msg()
1379 if (p_hdr->status != BUF_STATUS_UNLINKED) 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()
1392 p_hdr->p_next = NULL; in GKI_isend_msg()
1393 p_hdr->status = BUF_STATUS_QUEUED; in GKI_isend_msg()
1394 p_hdr->task_id = task_id; in GKI_isend_msg()